Time
class in UnityEngine
Description
Unity当中获取 时间信息的接口
Static Variables
captureFramerate | Slows game playback time to allow screenshots to be saved between frames. |
deltaTime | The time in seconds it took to complete the last frame (Read Only). 上一帧完成所用的时间秒(只读) |
fixedDeltaTime | The interval in seconds at which physics and other fixed frame rate updates (like MonoBehaviour's FixedUpdate) are performed. 在物理和固定帧更新的时间间隔秒(类似MonoBehavior's FixedUpdate) |
fixedTime | The time the latest FixedUpdate has started (Read Only). This is the time in seconds since the start of the game. 最近的一次FixedUpdate已开始的时间(只读)自游戏开始计时,以秒记。 |
frameCount | The total number of frames that have passed (Read Only). 已经执行的帧率的总数。 |
maximumDeltaTime | The maximum time a frame can take. Physics and other fixed frame rate updates (like MonoBehaviour's FixedUpdate). 在物理帧和其他帧更新中,一帧能获取的最大时间。 |
realtimeSinceStartup | The real time in seconds since the game started (Read Only). 从游戏开始到现在所消耗的实时时间(只读)。 |
smoothDeltaTime | A smoothed out Time.deltaTime (Read Only). 一个平滑淡出的Time.deltaTime(只读) |
time | The time at the beginning of this frame (Read Only). This is the time in seconds since the start of the game. 从游戏开始到现在所消耗的时间(只读)。 |
timeScale | The scale at which the time is passing. This can be used for slow motion effects. 时间的消耗速率,可以减慢运动效果。 |
timeSinceLevelLoad | The time this frame has started (Read Only). This is the time in seconds since the last level has been loaded. 从上次加载管卡完成到现在所用的时间(只读) |
unscaledDeltaTime | The timeScale-independent time in seconds it took to complete the last frame (Read Only). 不受timeScale系数影响的deltaTime。 |
unscaledTime | The timeScale-independant time at the beginning of this frame (Read Only). This is the time in seconds since the start of the game. 不受timeScale系数影响的Time.time。 |
1.timeScale影响的是Time.deltaTime的值,但不影响Time.FixedDeltaTime.
2.timeScale影响FixedUpdate 的执行速率,但不影响Update和LateUpdate.
3.timeScale影响Time.time的值和Time.FixedTime的值。