Documentation

Unity Engine

Download Unity

Unity Engine

Update.ScriptRunDelayedTasks

Native Player loop system that runs tasks posted to Unity's synchronization context, such as continuations of Task-based async methods.
Read time 1 minuteLast updated 5 days ago

Definition

public struct Update.ScriptRunDelayedTasks

Remarks

Code that follows an await expression runs here when the awaited Task completes, or when an Awaitable completes on another thread and its continuation must return to the main thread, such as after Awaitable.MainThreadAsync. Code that awaits an Awaitable that completes on the main thread, such as Awaitable.NextFrameAsync, runs in the system that completes it instead, not in this system.
This struct identifies a native system in the Player loop. It has no members, and the system's update logic runs in native engine code. Use this type with PlayerLoopSystem.type to find the system when you reorder, replace, or remove it in a custom Player loop. For more information, refer to Customizing the Player loop.