ドキュメント

Unity Engine

Unity Engine

Code reload

Understand when the Unity Editor reloads your code, and configure what reloads when you enter Play mode.
読み終わるまでの所要時間 1 分最終更新 22日前

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 lifecycleUnderstand 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 modeUnderstand what Unity reloads on entering Play mode and how you can configure this behavior for faster development iteration times.

Additional resources