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.
Awake runs once when the script instance is loaded, before any Start. Start runs before the first frame update, only if the script is enabled. Use Awake for self-initialisation and reference-getting; use Start for setup that depends on other objects being initialised.
In what order do Awake calls run across multiple scripts?+
Unity does not guarantee order between scripts by default. Use Edit > Project Settings > Script Execution Order to force one script to run before another. Otherwise, do not rely on Awake order; use Start or explicit initialisation calls.
When does FixedUpdate run compared to Update?+
FixedUpdate runs at a fixed timestep (default 0.02s, 50Hz), independent of frame rate. Update runs once per frame. FixedUpdate may run zero, one, or multiple times per frame. Use FixedUpdate for physics; use Update for input and visuals.
When does OnEnable run?+
OnEnable runs every time the GameObject or component becomes enabled, including on the initial activation after Awake. It runs before Start on the first activation. Use it for state that needs to reset every time the object is reactivated, like subscribing to events.