I have two UIToggle objects, so when I click on, for example, toggle 1 it enables itself and toggle 2 becomes disabled. But I am trying to toggle them in the script.
I get the UIToggle 1 like this:
UIToggle toggleOn = ToogleParen.transform.FindChild("ButtonOn").GetComponent<UIToggle>();
And activate it doing this:
toggleOn.value = true;
The problem becomes when I try to deactivate it:
toggleOn.value = false; <--- does nothing, the toggle button does not deactivate!!
Does anyone know how to toggle two UIToggle objects programmatically?
Thank you!!