Documentation

Unity Engine

Unity Engine

Update

Player loop phase that calls MonoBehaviour.Update, resumes coroutines, and runs other per-frame script updates.
Read time 2 minutesLast updated 5 days ago

Definition

public struct Update

Remarks

Update
runs after
PreUpdate
and before
PreLateUpdate
. Systems in this phase do the following:
This struct identifies a phase of the Player loop. It has no members. In the default Player loop, the
PlayerLoopSystem
for this phase contains a PlayerLoopSystem.subSystemList of native engine systems, each identified by one of the structs nested in this type.
Use 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.

Structs

Struct

Description

Update.DirectorUpdateNative Player loop system that processes PlayableGraph instances during the Update stage, after MonoBehaviour.Update runs.
Update.ScriptRunBehaviourUpdateNative Player loop system that calls MonoBehaviour.Update on all active scripts.
Update.ScriptRunDelayedDynamicFrameRateNative Player loop system that runs delayed script calls that are due, such as coroutines that yield null or WaitForSeconds.
Update.ScriptRunDelayedTasksNative Player loop system that runs tasks posted to Unity's synchronization context, such as continuations of Task-based async methods.