on and off for booleans in unity 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