dotTrace 2020.3 Help

Profile Unity Application

To profile a standalone Unity application (Unity 2018.3 and later)

  1. Run dotTrace as a standalone application. The dotTrace Home window will open.

  2. In the left panel, select Profile Local App.

  3. In the middle panel in Profile Application, select Unity Application.

  4. In the right panel, in Unity Application:

    • In Application, specify the path to the application executable you are going to profile.

    • Optionally, if your application requires command-line arguments, select Advanced and specify Arguments.

    • Optionally, if your application creates a number of processes and you want to profile a specific one, select Advanced and Profile child processes. Add a process filter as described in the Standalone Applications section.

    For more details on standalone application options, refer to the Standalone Applications section.

  5. In Profiler Options, specify profiling type. Currently, you can use only the Timeline profiling type (determine slowest methods and how method calls are distributed in time).
    For more details on profiler options, refer to the Profiler Options section.

  6. Optionally, if you want to profile the native part of your Unity application, you should select the Enable native profiling option in the Advanced settings. This option may be helpful for finding low-level performance issues related to rendering and other Unity engine subsystems.

  7. Optionally, if you are going to control profiling session (take snapshots, end session, and so on) using the API (rather than the Controller window), select Advanced and Use profiler API. For more details on how to control profiling using the API, refer to the Control Profiling Session with API chapter.

  8. Click Run.

  9. Collect profiling data (snapshots). For more details on how to control profiling session, refer to Control Profiling Session (if you control the session manually) or to Control Profiling Session with API (if you control profiling using the API).

  10. After you collect the data, either close the profiled application or detach the profiler using the Detach button of the Controller window. If you use the API to control profiling, detaching must be executed by your code.

  11. Analyze the collected snapshots either in the Timeline Viewer.

Last modified: 08 March 2021