0% found this document useful (0 votes)
27 views1 page

Unity Event Life Cycle

The document outlines the various lifecycle methods and events in Unity scripting, detailing when each method is called during the game loop. It includes information on initialization, physics updates, input events, rendering, and decommissioning of scripts. Additionally, it highlights the behavior of coroutines and the timing of certain events like pausing and quitting the application.

Uploaded by

anthonysalman20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Unity Event Life Cycle

The document outlines the various lifecycle methods and events in Unity scripting, detailing when each method is called during the game loop. It includes information on initialization, physics updates, input events, rendering, and decommissioning of scripts. Additionally, it highlights the behavior of coroutines and the timing of certain events like pausing and quitting the application.

Uploaded by

anthonysalman20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Firefox file:///E:/Projects/UCP/Game Development/Fall 2019/Week1/Looney ...

Initialization
Reset is called when the script is attached and not in playmode.
Editor
Start is only ever called once for a given script.
Initialization

The physics cycle may happen more than once per frame if FixedUpdate
the fixed time step is less than the actual frame update time.
Internal physics update
OnTriggerXXX Physics
OnCollisionXXX

yield WaitForFixedUpdate

OnMouseXXX
Input events

If a coroutine has yielded previously but is now due to yield WaitForSeconds


resume then execution takes place during this part of the
update. yield WWW
yield StartCoroutine Game logic
Internal animation update
LateUpdate

OnWillRenderObject

OnBecameVisible
OnBecameInvisible
OnPreRender Scene rendering
OnRenderObject
OnPostRender
OnRenderImage

OnDrawGizmos is only called while working in the editor. OnDrawGizmos


Gizmo rendering
OnGUI is called multiple time per frame update.
GUI rendering

yield WaitForEndOfFrame
End of frame
OnApplicationPause is called after the frame where the
pause occurs but issues another frame before actually pausing. OnApplicationPause
Pausing

OnApplicationQuit

OnDisable is called only when the script was disabled during


the frame. OnEnable will be called if it is enabled again.
Decommissioning
OnDestroy

1 of 1 09-Mar-21, 10:31 AM

You might also like