PreUpdate
Player loop phase that prepares physics, input, navigation, and other systems before MonoBehaviour.Update runs.
阅读时间2 分钟最后更新于 5 天前
Definition
- Type: Struct
- Namespace: UnityEngine.PlayerLoop
- Assembly: UnityEngine.CoreModule
public struct PreUpdate
Remarks
PreUpdateFixedUpdateUpdateThis 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 Event function execution order.
Structs
Struct | Description |
|---|---|
| PreUpdate.AIUpdate | Native Player loop system that updates NavMesh agents and applies NavMesh carving results before scripts update. |
| PreUpdate.CheckTexFieldInput | Native Player loop system that records whether a text field has keyboard focus at the start of the frame. |
| PreUpdate.IMGUISendQueuedEvents | Native Player loop system that sends queued input events to the immediate mode GUI (IMGUI) system. |
| PreUpdate.InputForUIUpdate | Native Player loop system that reads input from the active input backend and dispatches it as input events to runtime UI Toolkit panels. |
| PreUpdate.NewInputUpdate | Native Player loop system that processes input events for the Input System package when it's set to update dynamically each frame. |
| PreUpdate.Physics2DUpdate | Native Player loop system that interpolates 2D physics body poses for the current frame. |
| PreUpdate.PhysicsCore2DUpdate | Native Player loop system that performs the pre-update for the low-level 2D physics API in the Unity.U2D.Physics namespace. |
| PreUpdate.PhysicsUpdate | Native Player loop system that interpolates 3D physics body positions for the current frame. |
| PreUpdate.SendMouseEvents | Native Player loop system that sends mouse event messages, such as OnMouseDown and OnMouseEnter, to scripts. |
| PreUpdate.UIElementsPreparePanelRenderers | A native engine system that the native player loop updates. |
| PreUpdate.UpdateVideo | Native Player loop system that updates Video Player playback before scripts update. |
| PreUpdate.WindUpdate | Native Player loop system that updates wind zones that affect SpeedTree vegetation. |