Unity's code lifecycle
Understand the lifecycle of code in Unity, from code load, unload, and reload in different contexts.
Read time 1 minuteLast updated 2 days ago
During the period of its availability, code is loaded, initialized, executed, decommissioned, and unloaded or destroyed. This sequence of stages through which code transitions is referred to as the code lifecycle.
Topic | Description |
|---|---|
| Accessing the code lifecycle | Use Unity's lifecycle APIs to hook into key stages of the code lifecycle to perform setup and cleanup work or handle Edit mode and Play mode transitions. |
| Code lifecycle execution order reference | Understand the execution sequence of lifecycle API callbacks and other events during code loading, unloading, and reloading in the Unity Editor and Player. |