The FrameTimingManager is an API that captures detailed timing data about performance during individual frames in an application. You can use this data to assess those frames to understand why your application doesn’t meet performance targets.
Use the FrameTimingManager if:
Frame timings don’t replace data from the ProfilerA window that helps you to optimize your game. It shows how much time is spent in the various areas of your game. For example, it can report the percentage of time spent rendering, animating, or in your game logic. More info
See in Glossary; after you profile your application at a high level, use the FrameTimingManager to investigate specific details. The FrameTimingManager decreases performance when it records data, so it can’t produce an accurate measurement of how your application performs.
Property | Description | Supported | Comment |
---|---|---|---|
Windows | DirectX 11 | Yes | |
DirectX 12 | Yes | ||
OpenGL | Yes | ||
Vulkan | Yes | ||
macOS | Metal | Yes | Might report a larger GPU time measurement than the total frame time due to the behavior of tile-based deferred rendering GPUs. |
Linux | OpenGL | Partial | Doesn’t support the GPU time measurement. |
Vulkan | Yes | ||
Android | OpenGL ES | Yes | |
Vulkan | Yes | ||
iOS | Metal | Yes | Might report a larger GPU time measurement than the total frame time due to the behavior of tile-based deferred rendering GPUs. |
tvOS | Metal | Yes | Might report a larger GPU time measurement than the total frame time due to the behavior of tile-based deferred rendering GPUs. |
WebGLA JavaScript API that renders 2D and 3D graphics in a web browser. The Unity Web build option allows Unity to publish content as JavaScript programs which use HTML5 technologies and the WebGL rendering API to run Unity content in a web browser. More info See in Glossary |
WebGL | Partial | Doesn’t support the GPU time measurement. |
The FrameTimingManager provides results with a set delay of four frames. This is because timing results aren’t immediately available at the end of each frame, so the FrameTimingManager waits to get CPU and GPU data for the frame.
The delay doesn’t guarantee accurate timing results, because the GPU may not have any available resources to return the results, or might fail to return them correctly.
The FrameTimingManger changes how it produces a FrameTimeComplete timestamp under some circumstances: