- Home /
Deactivate an object - and all scripts in that object deactivated?
When you deactivate a gameobject, do all scripts in that object become deactivated, too? What if a script in the deactivated object is referenced in another object?
Answer by sneftel · May 30, 2011 at 11:34 PM
They are deactivated, yes, in the sense that OnDisable() is called, and Update() is not called each frame. They still exist, though. So if a script was referenced in another object, it's still referenced.
if a script doesn't have an update() does not disabling the object affect performance? (if it's not used)
Your answer
Follow this Question
Related Questions
activate object on key press only, otherwise always deactivated! 2 Answers
Turning off rigidbody without turning the entire object inactive? 1 Answer
Having a game object de-activate itself 1 Answer
Children of DualTouchControls prefab keep being forced to active 0 Answers
Disable/Enable Script or Add/Remove? 1 Answer