unity bool = toggle.value code example
Example: bool toggle unity c#
private bool togl;
togl = !togl; //this is what changes the bool the the other state
private bool togl;
togl = !togl; //this is what changes the bool the the other state