I am making a 2d game in unity. I am using the UI toggle methods and wish to make one of those turn off when the other one is turned on. The method I have tried is doing the following code below (InfiniteMode and CampaignMode are the names of the two toggles):
if (InfiniteMode.isOn)
{
PlayInfinite();
CampaignMode.onValueChanged.Invoke(false);
}
if (CampaignMode.isOn)
{
PlayCampaign();
InfiniteMode.onValueChanged.Invoke(false);
}
Any help for what I can do to achieve this would be great.