Four years have passed since I started to use Unity, but I have misunderstood about the title.
Basically, Awake and Start are UnityEvent Function called when a Gameobject is activated.
But, how about are the below situations?
A Gameobject is active, a component is disable.
In this case, only Awake is called.
A Gameobject is inactive, a component is enable.
In this case, nothing is called.
Switch a Gameobject in the order of active, inactive, and active.
In this case, Awake and Start are called only once.
If you want to call something when a Gameobject's active changes, you can use OnEnable which is UnityEvent Function.
Top comments (0)