

For backwards compatibility, you can also use the UNITY_2020_2_OR_NEWER symbol to remove the metrics code from earlier versions of Unity.

The ENABLE_PROFILER symbol is only defined for development builds, so this allows your scripts to compile in builds where the metrics are unavailable. You must guard any calls to the AsyncReadManagerMetrics APIs inside an #if preprocessor directive using the ENABLE_PROFILER symbol. The AsyncReadManagerMetrics class is only available in development builds A development build includes debug symbols and enables the Profiler. This metrics information can help you identify problem areas involving asset loading as well as measure the impact that your changes have on asset loading performance. You can also filter and summarize the recorded data to help your analysis. The AsyncReadManagerMetrics class allows you to enable metrics collection and retrieve the recorded metrics data. More info See in Glossary using AsyncReadManager.Read. In addition, you can load files from scripts A piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like.

The files loaded with the AsyncReadManager include AssetBundles, Addressables and Resources. The Unity Engine uses the AsyncReadManager to read most files at runtime. This class records data about all the file read operations managed by the AsyncReadManager. Use the AsyncReadManagerMetrics class to monitor runtime asset loading and file reading performance.
