After adding a particular script to a GameObject, I notice that there’s no little check box to enable/disable it in the inspector. Would anyone know why this is?
I see that things like Transforms and Mesh Filters don’t have that check box either, but I can understand that–they’re more low-level sorts of things. I just found it bizarre that a script could be missing this option too.
(Hint: this is happening on one of the NGUI example scripts, if that helps.)
Disabling a script only turns off Update (plus related such as FixedUpdate) and OnGUI, so if those functions aren’t present then disabling a script isn’t possible.
My script had a “OnMouseDown()” only.
I also wanted to disable the script (for test reasons).
What I did is this:
Having only Start() also enables the on/off checker box from inspector. This means turned off script doesn’t process Start(), either.