unity script switch true to false code example Example: change true to false unity yourBool = !yourBool;