TimeUpdate
Player loop phase that waits for the previous frame to be presented and then updates the engine time for the new frame.
阅读时间2 分钟最后更新于 5 天前
Definition
- Type: Struct
- Namespace: UnityEngine.PlayerLoop
- Assembly: UnityEngine.CoreModule
public struct TimeUpdate
Remarks
TimeUpdateThese values change while the phase runs. For each fixed timestep, every system in that phase, including any custom systems you add to it, reads fixed-timestep values. During this time, Time.time returns Time.fixedTime and Time.deltaTime returns Time.fixedDeltaTime. This includes MonoBehaviour.FixedUpdate() and coroutines that yield WaitForFixedUpdate. When the phase finishes, these properties return the values for the current frame again.
FixedUpdateFixedUpdateThis struct identifies a phase of the Player loop. It has no members. In the default Player loop, the for this phase contains a PlayerLoopSystem.subSystemList of native engine systems, each identified by one of the structs nested in this type.
PlayerLoopSystemUse this type with PlayerLoopSystem.type to find the phase when you add your own systems to it, or when you reorder, replace, or remove the systems it contains. If you remove or replace a native system, Unity no longer performs that system's work, so the related engine feature might stop working. Some native systems are active only in the Editor, only in Players, or only on platforms and configurations that support the related feature. Elsewhere, those systems remain in the Player loop but don't do anything.
For more information, refer to Customizing the Player loop and Order of execution for event functions.
Structs
Struct | Description |
|---|---|
| TimeUpdate.WaitForLastPresentationAndUpdateTime | Native Player loop system that waits for the previous frame to be presented and then updates the engine time for the new frame. |