Version: Unity 7.0 Alpha (7000.0)
Language : English
Code reload and serialization
Accessing the code lifecycle

Code reload

As you develop and iterate, the Unity Editor automatically reloads your project code as necessary to incorporate changes you make.

It’s important to understand how code reload works to avoid issues such as code reload leaks, which can cause memory leaks and other problems in your project.

You can also use Unity’s lifecycle APIs to hook into key stages of the code loading and reloading lifecycle, to perform setup and cleanup work or handle Edit mode and Play mode transitions.

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 reload and assembly load context leaks Understand code reload, and diagnose and fix AssemblyLoadContext leaks.
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
Accessing the code lifecycle
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961