Tags and Layers
Visual Studio C# 集成

Time

The Time settings (menu: Edit > Project Settings, then the Time_ category) lets you set a number of properties that control timing within your game.

属性

属性: 功能:
Fixed Timestep 独立于帧率的时间间隔,确定了执行物理计算和 FixedUpdate() 事件的时间间隔。
Maximum Allowed Timestep 帧率较低时允许最坏情形的时间间隔(独立于帧率)。执行物理计算和 FixedUpdate() 事件的时间长度将不会超过指定值。
Time Scale 时间进展的速度。更改此值可模拟子弹时间效果。值 1 意味着实时。值 0.5 意味着半速;值 2 表示速度翻倍。
Maximum Particle Timestep 独立于帧率的时间间隔,用于控制粒子模拟的精度。当帧时间超过此值时,将在一帧中执行粒子更新的多次迭代,使每个步骤的持续时间不超过此值。例如,以 30fps(0.03 秒/帧)运行的游戏能够以 60fps(步长 0.0167 秒)运行粒子更新,从而实现更准确的模拟,但代价是性能降低。

详细信息

The Time Manager lets you set properties globally, but it is often useful to set them from a script during gameplay (for example, setting Time Scale to zero is a useful way to pause the game). See the page on Time and Framerate Management for full details of how time can be managed in Unity.


2017–05–18 Page published with limited editorial review

2017.1 版中添加了 Maximum Particle Timestep NewIn20171

Tags and Layers
Visual Studio C# 集成