Version: Unity 6.6 (6000.6)
Language : English
Code reload and serialization
Code reload and the code lifecycle

Code reload

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.

Additional resources

Code reload and serialization
Code reload and the code lifecycle
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961