How do I toggle the checkbox to show both on/off states. For example I want to enable something when checked and disable the same thing when unchecked. I have tried adding the toggle to the script by using public Toggle vsyncToggle; but that didn’t let me add the object to it. I also have using UnityEngine.UI in my script. Any help?
bool someState = false;
void OnTogglePushed(){
someState = !someState;
someObjectToDisplay.SetActive(someState);
}