non-enabled scripts are receiving SendMessage ?

Is it intentional behaviour that scripts, even if they are not enabled (in the inspector, or via component.enabled = false) are receiving and reacting to SendMessage() ?

I have this odd case (U3b4) where I can disable a script, but it will run the SetMessage() called function. It will not run OnGUI() or Update(), but what I call works.

I could understand this being intended as a way to wake up scripts, but then how do I really disable a script so that it isn’t listening anymore?

I guess you have to put a test if (enabled == true) to all your functions before execution of their content. Not aesthetic but very simple and should do the trick.

Yes, scripts that are disabled don’t run Update and related functions, but that’s pretty much it. You can either destroy the component, or use a “if (!enabled) return;” line in the function to prevent it from executing if the script’s disabled.

–Eric