Version: 2022.2

FrameTimingManager

class in UnityEngine

切换到手册

描述

The FrameTimingManager allows the user to capture and access FrameTiming data for multiple frames.

The FrameTimingManager is always active on Development Player builds. To use this feature for other build types, go to Edit > Project Settings > Player and enable the Frame Timing Stats property. The FrameTimingManager also depends on the Dynamic Resolution feature and so is only supported on platforms that support Dynamic Resolution.

静态函数

CaptureFrameTimings此函数触发 FrameTimingManager,以便捕获 FrameTiming 数据的快照,然后用户可访问这些数据。
GetCpuTimerFrequency这会返回当前平台的 CPU 计时器频率,用于中断计时结果。如果该平台不支持返回该值,则将返回 0。
GetGpuTimerFrequency这会返回当前平台的 GPU 计时器频率,用于中断计时结果。如果该平台不支持返回该值,则将返回 0。
GetLatestTimings可使用户访问当前捕获的 FrameTimings。
GetVSyncsPerSecond这会返回当前平台上的每秒 vsync 数,用于中断计时结果。如果该平台不支持返回该值,则将返回 0。
IsFeatureEnabledCheck if frame timing statistics are enabled.