Time 设置(菜单:__Edit > Project Settings__,然后选择 Time_ 类别)可用于设置多个属性以控制游戏中的时序。
属性: | 功能: |
---|---|
Fixed Timestep | 独立于帧率的时间间隔,确定了执行物理计算和 FixedUpdate() 事件的时间间隔。 |
Maximum Allowed Timestep | 帧率较低时允许最坏情形的时间间隔(独立于帧率)。执行物理计算和 FixedUpdate() 事件的时间长度将不会超过指定值。 |
Time Scale | 时间进展的速度。更改此值可模拟子弹时间效果。值 1 意味着实时。值 0.5 意味着半速;值 2 表示速度翻倍。 |
Maximum Particle Timestep | 独立于帧率的时间间隔,用于控制粒子模拟的精度。当帧时间超过此值时,将在一帧中执行粒子更新的多次迭代,使每个步骤的持续时间不超过此值。例如,以 30fps(0.03 秒/帧)运行的游戏能够以 60fps(步长 0.0167 秒)运行粒子更新,从而实现更准确的模拟,但代价是性能降低。 |
Time Manager 用于设置全局属性,但在游戏过程中通过脚本设置这些属性通常很有用(例如,将 Time Scale 设置为零是暂停游戏的有效方法)。有关如何在 Unity 中管理时间的完整详细信息,请参阅时间和帧率管理页面。
2017–05–18 页面已发布
在 2017.1 版中添加了 Maximum Particle Timestep NewIn20171
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.