Will the state of a boolean be constant/per frame validated or only when the value changes?

I want the character to switch between controls at some point in my game. Should I use a boolean in a if-statement to determine that or should I use a new script that wil disable the previous script that will be called with on…enter() to have best performance. I red that disabling components will eat up some performance but if statements have to be called every frame, also with boolean?


I’m not sure to understand what you want to know. But Controls (key detections) is executed in Update, so is executed every frame.

Have all Update divided into 2 zones (if bool==true {} and else {}) will not decrease performance. I mean i think the good solution is to have a bool variable to know if need to detect once controls or the other controls.