文档

Unity Engine

Download Unity

Unity Engine

Collect performance data in Play mode

Profile in Play mode in the Unity Editor.
阅读时间1 分钟最后更新于 1 个月前

Profile in Play mode to quickly test changes and monitor the performance of your application without having to rebuild your application every time.
To profile in Play mode:
  1. Open the Profiler (Window > Analysis > Profiler)
  2. Select the Target Selection dropdown, next to Record
  3. Select Play Mode

Profiler window's Target Selection dropdown

Unity Profiler minimizes the overhead of profiling the Editor itself and represents any Editor-only activity when profiling Play mode as EditorLoop markers.

Timeline view of Play mode frame

提示
Whenever you profile Play mode, open it in a maximized view to run your application at a resolution closer to that of your target device. This directly affects performance issues such as those related to fill rate.
To make sure that windows other than Play mode or the Profiler don't use up time on the render thread and GPU, which affects performance data, reduce the amount of open Unity Editor windows.

Additional resources