Project issues
Resolve common issues with your project.
Read time 2 minutesLast updated 6 days ago
When you create a report, Project Auditor gives a high level indication of the types of issues that your project has. Those issues are divided into project areas which display detailed information and suggestions for how to fix common issues.
Managed memory issues
Because Unity uses a managed memory system, to optimize your code for performance, you must avoid situations where your application triggers the garbage collector a lot. Refer to Optimizing your code for managed memory to troubleshoot common issues such as avoiding boxing, which causes high overhead.
Managing assets
How you load and manage assets at runtime can affect the performance of your project and the build size of your application. Unity has several different ways to manage the assets in your project at runtime, and you can avoid a lot of performance issues if you select the right asset management system for your project's needs. For more information about asset management, refer to Introduction to runtime asset management.
Code reloading issues
Project Auditor uses a Roslyn analyzer to detect code issues that can cause unexpected or nondeterministic behavior if code reload on entering Play mode is disabled in your project, which it is by default. Code reloading can impact project iteration times, in particular the time it takes to enter and exit Play mode, so it's best practice to fix all the issues, and then keep code reload disabled.
Code reload overview
For an overview of what code reload is and the effects of keeping it disabled, refer to Enter Play mode without code reload.
The Roslyn analyzer searches the project's code for types with static fields that would keep their value between different Play mode runs unless reset.
Project Auditor raises warning diagnostics if a type has any static fields, automatic properties, or events that are not decorated with either the or the attribute. The analyzer emits warnings with the prefix.
[AutoStaticsCleanup][NoAutoStaticsCleanup]UALDisplay code reload issues
Project Auditor displays code reload issues in the Code Issues view, alongside other code issues. These issues affect Editor iteration time, and they also appear in the results when you migrate a project from Mono to CoreCLR.
Resolve code reload issues
For information on the exact warning codes generated by the analyzer and the appropriate resolution for each of them, refer to Automatic reset of static state.