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