Why some script components don't have check mark to enable/disable them in editor?

Hi,

Some of my script components don’t have the check mark (or tick box) that most other components have in order to enable/disable them. Why is that?

Thanks.

This is a good question, I noticed this myself, but didn’t give it much thought.

Now that you asked, I looked into it, and it turns out that scripts only get the enabled-checkbox if they implement any MonoBehaviour-functions (Update, FixedUpdate, Start etc…). This means that when a script is enabled, it will receive these messages from the engine. Conversely, while the script is disabled, it will not. There is no other effect for a script to being enabled or disabled, as far as I can tell.

Notice, that because Awake is the ‘constructor’ for MBs, it will be called regardless of whether the script is enabled or disabled. As such, it will not cause the checkbox to be shown.

As a side note, I’ve also noticed that if you define another class within a Monobehaviour class, the checkmark also goes away. Thus, my object wasn’t behaving properly.

Script only contains callbacks which will work even if component disabled.