Inactive script still catching collision/trigger
Hello,
I have a few gameObjects on my actual scene with a script handling collisions. For debug purposes I tried to disable (unchecking in the editor) the script but even if it doesn't execute its main purpose it looks like the script is still catching collisions/triggers. Why is that ?
Thanks for answering.
Answer by Developer1212 · Oct 26, 2015 at 12:22 PM
Don't uncheck it, delete the script from the component list then put it back when done testing
Thanks for the tip (sorry for the delay).
I bump this thread becausse I finaly found the explanation of this behavior in the $$anonymous$$onoBehaviour doc. http://docs.unity3d.com/ScriptReference/$$anonymous$$onoBehaviour.html
Note: The checkbox for disabling a $$anonymous$$onoBehavior (on the editor) will only prevent Start(), Awake(), Update(), FixedUpdate(), and OnGUI() from executing. If none of these functions are present, the checkbox is not displayed.
judging by this part of the doc. It looks like unchecking the box in the edtior wouldn't stop the script to execute onCollisionEnter() and some others functions.... Thought I could be wrong, it's been a long time since I fixed this problem.