Just wondering about how GameObject.active works? Currently I have a small demo using the first person controller prefab where I can walk around a room.
If I set the first person controller object's active member to false it still seems to be running the MouseLook script. All other scripts attached to the object appear to be disabled.
Has anyone else had this problem? I tried pulling out the MouseLook script and deactivating it directly by going GetComponent().enabled = false but that didn't seem to work.
I'm pretty sure there are no other instances of the script running.
asked Nov 25 '10 at 03:18 AM
This is maybe what you need.
answered Nov 25 '10 at 06:37 AM
I don't know if there are certain scripts that can be run while it is disabled, I dont think so but for the sake of completeness See note about MonoBehaviours enable.
answered Dec 11 '10 at 09:37 AM