Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Introduction to collecting performance data

Understand the various ways of collecting performance data through the Profiler.
Read time 3 minutesLast updated a day ago

Use the Profiler window to collect performance data related to your application.
You can collect data with the Profiler from the following sources:
Note
To collect data for a Profiler module, you need to enable it. For more information, refer to Activating Profiler modules.

Profile data on a target platform

To test how a development build of an application performs on a specific platform, connect it to the Profiler. Profiling on a target platform gives the most accurate timings and performance data compared to profiling in Play mode.
For more information on profiling on a target device, refer to Collect performance data on a target platform.

Profile Play mode

To assess the performance of your application without the need to build your application, profile it directly in Play mode in the Unity Editor. Play mode is the Profiler’s default target.
Profiling in Play mode doesn’t give you an accurate reflection of what the performance of your application looks like on a real device. It’s useful to test out changes without having to rebuild a player, and to identify areas to investigate further.
Play mode runs in the same application and main thread as the Editor which means that the Editor’s systems such as the UI, Inspectors, Scene view rendering, and asset management affect the performance and memory measurements you get when profiling in Play mode.
To effectively profile in Play mode, build your application often and deploy it to a range of target devices, and test and profile your application on these devices. If you identify performance issues with your application on these devices, narrow down the area that needs the most attention.
You can then profile your application in Play mode and iterate over any changes you make to your application. Build and deploy your application to the target devices again to validate your changes.
For more information on profiling in Play mode, refer to Collect performance data in Play mode.

Profile the Unity Editor

The Editor might affect the performance of your application, because it uses the same resources as your application when it's running in Play mode. You can profile the Editor separately to find out what resources it uses. This is useful if you have designed your application to work only in Play mode, such as for movie making.
You can also profile in Play mode or profile the Editor to identify issues unrelated to the performance of your application. For example, to investigate if long load times or an unresponsive Editor slows down iteration time, or if your application’s performance is poor in Play mode.
For more information on profiling the Unity Editor, refer to Collect performance data about the Unity Editor.

Additional resources