Time类
从Unity中获取时间信息的接口。
public static float realtimeSinceStartup { get; }
摘要:The real time in seconds since the game started (Read Only).
游戏开始后以秒为单位的实时时间(只读)。即游戏运行时间。
public static int frameCount { get; }
摘要:The total number of frames that have passed (Read Only).已通过的帧的总数(只读)
public static float timeScale { get; set; }
摘要:The scale at which the time is passing. This can be used for slow motion effects.
时间流逝的尺度。这可以用于慢动作效果。
public static float maximumParticleDeltaTime { get; set; }
摘要:The maximum time a frame can spend on particle updates. If the frame takes longer than this, then updates are split into multiple smaller updates.
一帧用于粒子更新的最长时间。如果帧花费的时间比这个长,那么更新就会被分成多个较小的更新。
public static float smoothDeltaTime { get; }
摘要: A smoothed out Time.deltaTime (Read Only).平滑的时间间隔(只读)。
public static float maximumDeltaTime { get; set; }
摘要:The maximum time a frame can take. Physics and other fixed frame rate updates (like MonoBehaviour's MonoBehaviour.FixedUpdate) will be performed only for this duration of time per frame.
一帧所能花费的最大时间。物理和其他固定帧速率更新(如MonoBehaviour的MonoBehaviour. fixedupdate)只在每帧的这段时间内执行。
public static int captureFramerate { get; set; }
摘要: Slows game playback time to allow screenshots to be saved between frames.
放慢游戏回放时间,以便在帧与帧之间保存截图。
public static float fixedDeltaTime { get; set; }
摘要: The interval in seconds at which physics and other fixed frame rate updates (like MonoBehaviour's MonoBehaviour.FixedUpdate) are performed.
物理和其他固定帧速率更新(如MonoBehaviour的MonoBehaviour. fixedupdate)执行的时间间隔(以秒为单位)。
public static float unscaledDeltaTime { get; }
摘要:The timeScale-independent interval in seconds from the last frame to the current one (Read Only).
从最后一帧到当前帧(只读)的时间间隔(以秒为单位)。
public static float fixedUnscaledTime { get; }
摘要: The TimeScale-independant time the latest MonoBehaviour.FixedUpdate has started (Read Only). This is the time in seconds since the start of the game.
与时间尺度无关的时间是最新的单行为。FixedUpdate已经启动(只读)。这是游戏开始后以秒为单位的时间。
public static float unscaledTime { get; }
摘要: The timeScale-independant time for this frame (Read Only). This is the time in seconds since the start of the game.
此帧的时间尺度无关的时间(只读)。这是游戏开始后以秒为单位的时间。
public static float fixedTime { get; }
摘要:The time the latest MonoBehaviour.FixedUpdate has started (Read Only). This is the time in seconds since the start of the game.
时间最新的单行为。FixedUpdate已经启动(只读)。这是游戏开始后以秒为单位的时间。
public static float deltaTime { get; }
摘要: The completion time in seconds since the last frame (Read Only).从最后一帧开始的完成时间(只读),以秒为单位。
public static float timeSinceLevelLoad { get; }
摘要:The time this frame has started (Read Only). This is the time in seconds since the last level has been loaded.
此帧已开始的时间(只读)。这是以秒为单位的时间,从最后一个级别已经加载。
public static float time { get; }
摘要: The time at the beginning of this frame (Read Only). This is the time in seconds since the start of the game.
此帧开始的时间(只读)。这是游戏开始后以秒为单位的时间。
public static float fixedUnscaledDeltaTime { get; }
摘要: The timeScale-independent interval in seconds from the last fixed frame to the current one (Read Only).
从最后一个固定帧到当前帧(只读)的时间间隔(以秒为单位)。
public static bool inFixedTimeStep { get; }
摘要:Returns true if called inside a fixed time step callback (like MonoBehaviour's MonoBehaviour.FixedUpdate), otherwise returns false.
如果在固定时间步回调函数中调用(如MonoBehaviour的monobehavior . fixedupdate),则返回true,否则返回false。