Code reload
Understand when the Unity Editor reloads your code, and configure what reloads when you enter Play mode.
Read time 1 minuteLast updated 2 days ago
The Unity Editor reloads compiled code and resets static state when you change a script. By default, entering Play mode reloads the scene without reloading code, so static state persists between sessions.
You can also hook into the stages of the reload process from your own code, and configure which parts of the reload Unity performs.
Topic | Description |
|---|---|
| Code reload and the code lifecycle | Understand how and when the Editor reloads parts of your project code, and how your code can hook into the code lifecycle to perform setup and cleanup at key stages. |
| Code and scene reload on entering Play mode | Understand what Unity reloads on entering Play mode and how you can configure this behavior for faster development iteration times. |