Game Dev Cheat Sheet

Unity Scripting Order Reference

Interactive MonoBehaviour lifecycle diagram. Click any callback to see its description and code example.

Understanding when each Unity callback runs is critical for avoiding bugs. Should you initialise references in Awake or Start? Where does camera follow code go? When do physics callbacks fire relative to Update? This interactive diagram shows the complete MonoBehaviour lifecycle with code examples for each event.

Lifecycle Flowchart

Click any phase for code examples.

InitialisationAwake, OnEnableFirst FrameStartPhysicsFixedUpdate, OnCollision/TriggerloopInputOnMouse*, Input pollingGame LogicUpdateCoroutinesyield WaitForSeconds, etc.Late Game LogicLateUpdateRenderingOnWillRenderObject, OnGUIDecommissioningOnDisable, OnDestroy

Execution Order

Initialisation2
First Frame1
Physics3
Input1
Game Logic1
Late Game Logic1
Rendering4
Coroutines4
Decommissioning3

When Does X Run?