|
Init(args)
Scripting Reference
|
◆ OnEnable()
OnEnable is called every time the object becomes active and enabled. If the object has been attached to an Behaviour.enabled component on an active GameObject at edit time, then OnEnable is first called when the scene or prefab that contains the GameObject is being loaded. If the object is attached to an active GameObject at runtime, then OnEnable is first called immediately, right after the IAwake.Awake event. If the object is attached to a disabled component or an inactive GameObject, then OnEnable will be called when the object becomes active and enabled. A class that has the Service attribute receives the event when services are being initialized, after all service instances have been created. While Awake and IOnEnable.OnEnable are called (in that order) immediately for all enabled and active objects when a scene or a prefab is being loaded, IStart.Start only gets called after a short delay, just before the first IUpdate.Update event. |