Unity5.x 之 Time详解

Time

class in UnityEngine

Description

Unity当中获取 时间信息的接口

Static Variables

captureFramerateSlows game playback time to allow screenshots to be saved between frames.
deltaTimeThe time in seconds it took to complete the last frame (Read Only).
上一帧完成所用的时间秒(只读)
fixedDeltaTimeThe interval in seconds at which physics and other fixed frame rate updates (like MonoBehaviour's FixedUpdate) are performed.
在物理和固定帧更新的时间间隔秒(类似MonoBehavior's FixedUpdate)
fixedTimeThe time the latest FixedUpdate has started (Read Only). This is the time in seconds since the start of the game.
最近的一次FixedUpdate已开始的时间(只读)自游戏开始计时,以秒记。
frameCountThe total number of frames that have passed (Read Only).
已经执行的帧率的总数。
maximumDeltaTimeThe maximum time a frame can take. Physics and other fixed frame rate updates (like MonoBehaviour's FixedUpdate).
在物理帧和其他帧更新中,一帧能获取的最大时间。
realtimeSinceStartupThe real time in seconds since the game started (Read Only).
从游戏开始到现在所消耗的实时时间(只读)。
smoothDeltaTimeA smoothed out Time.deltaTime (Read Only).
一个平滑淡出的Time.deltaTime(只读)
timeThe time at the beginning of this frame (Read Only). This is the time in seconds since the start of the game.
从游戏开始到现在所消耗的时间(只读)。
timeScaleThe scale at which the time is passing. This can be used for slow motion effects.
时间的消耗速率,可以减慢运动效果。
timeSinceLevelLoadThe time this frame has started (Read Only). This is the time in seconds since the last level has been loaded.
从上次加载管卡完成到现在所用的时间(只读)
unscaledDeltaTimeThe timeScale-independent time in seconds it took to complete the last frame (Read Only).
不受timeScale系数影响的deltaTime。
unscaledTimeThe 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的值。


已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 游动-白 设计师:上身试试 返回首页
实付 19.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值