Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Project Auditor settings reference

Reference for the Preferences and Project Settings window.
Read time 3 minutesLast updated 13 days ago

You can configure Project Auditor in the following places in the Unity Editor:

Preferences reference

To open the Project Auditor Preferences go to Edit > Preferences (macOS: Unity > Settings), and then select Analysis > Project Auditor. The following preferences are available:

Analysis

Configure how Project Auditor performs analysis of your project.

Setting

Description

Project AreasSelect the Project Areas of the project to be included in project analysis. This property is set to All by default. This setting also appears when you start a new analysis in the Project Auditor window.
PlatformSpecify the target platform for analysis from a list of all the currently supported platform modules included in your installed Unity Editor. By default, Project Auditor uses the platform that's targeted in the Build Settings window. This setting also appears when you start a new analysis in the Project Auditor window.
Code Analysis AreasSpecify which assemblies to compile for code analysis. This property is set to All by default.

- Player (default): Compile code for analysis for a non-development build for the specified target platform. Code inside
#if DEVELOPMENT_BUILD
is excluded from the analysis.

- Editor: Perform analysis on Editor code assemblies. Select this option to analyze custom Editor code, including the contents of packages.

- Development Build: Compile code for analysis for a development build for the specified target platform. Code inside
#if DEVELOPMENT_BUILD
is included in the analysis.

- Tests: Include any assembly definition (.asmdef) files in analysis.

- Packages: Analyze packages listed in the Package Manager that are not authored by Unity.

This setting also appears when you start a new analysis in the Project Auditor window.
Use Roslyn AnalyzersEnable Roslyn analyzers, including one that reports issues impacting domain reload times. Roslyn analyzers can slow down the code compilation step of the analysis process, so this option can be used to disable Roslyn support if you don't need it.
Log timing informationEnable to log information to the Console about how long each analyzer took to run.

Build

Options to configure how Project Auditor interacts with the build process in your project.

Setting

Description

Log number of issues after BuildEnable to log the number of issues that Project Auditor finds to the Console.
Log Issues as ErrorsOnly available if the Log number of issues after Build setting is enabled. Enable to log any issues that Project Auditor finds as errors.

Report

Configure how Project Auditor handles the reports it generates.

Setting

Description

Prettify saved .projectauditor filesEnable to format project reports to make them easier to read. Disabling this setting reduces the file size of reports.

Project settings reference

To open the Project Settings window, go to Edit > Project Settings > Project Auditor.
You can set the threshold at which Project Auditor creates a warning for each of the items in this window, and for each platform available in your project.

Setting

Description

Streaming Audio Clip Threshold (Bytes)Creates an issue if a streaming Audio Clip is larger than this value in bytes.
Decompressed Audio Clip Threshold (Bytes)Creates an issue if a decompressed Audio Clip is larger than this value in bytes.
Compressed Audio Clip Threshold (Bytes)Creates an issue if a compressed Audio Clip is larger than this value in bytes.
Load in Background Audio Clip Threshold (Bytes)Creates an issue if a load in background Audio Clip is larger than this value in bytes.
Maximum non-streaming Texture size (pixels)Creates an issue if a Texture is larger than this value in pixels.
Empty Sprite Atlas use threshold (percentage, set to 100 to disable analysis)Warns if the percentage of unused pixels in a Sprite Atlas is greater than this value. Set to 100 to disable Sprite Atlas analysis.
StreamingAssets folder size limit (MB)Creates an issue if the StreamingAssets folder is larger than this value in MB. Applies to mobile devices only.

Additional resources