SetActive understand problem

I’ve heard that setting one gameObject to inactive will also make its scripts attached stop working and can’t get called. Today, in some cases, i have to hide some gameobject by SetActive(false), but found its scripts can always be called… I am really confused now. Can somebody explains?

Many thanks and sorry for my poor english.:slight_smile:

PS. i am using NGUITools.SetActive. This function called GameObject.SetActive to one GO’s transform only. I am not sure if this is the reason…

The public/static methods&variables of the scripts can be called even if the GameObject is inactive, but the general functions (Update, LateUpdate, etc) will not be automatically called by the engine (and probably the running coroutines will be stopped as soon as the object becomes inactive).

PS: GetComponent() on an inactive game object will return NULL.