WorkExecutionTime
Enum specifying which Unity frame phase a continuation or work request should execute in. Used by ParagonSynchronizationContext to route async callbacks to the correct WorkRunner queue, and by the Yield API to determine which runner to post to.
Definition
Namespace: Paragon.Core.Async Assembly: Paragon.dll
public enum WorkExecutionTimeRemarks
The mapping between WorkExecutionTime and Unity frame phases:
UPDATE — Runs during
PreUpdate, beforeMonoBehaviour.Update(). Continuations posted here execute each frame.LATE_UPDATE — Runs during
PreLateUpdate, beforeMonoBehaviour.LateUpdate(). Used byYield.WaitForEndOfFrame().FIXED_UPDATE — Runs at the start of
FixedUpdate, beforeMonoBehaviour.FixedUpdate(). Runs at the physics timestep rate. Used byYield.WaitForFixedUpdate().EDITOR_UPDATE — Only available in the Unity Editor. Runs on
EditorApplication.update, throttled to ~20 Hz (50ms intervals). Used byYield.WaitForEditorUpdate().
In Edit Mode (not playing), all continuations are routed to EDITOR_UPDATE regardless of the specified execution time, because the player loop is not running.
Quick Lookup
Run each frame (default)
WorkExecutionTime.UPDATE
Run after Update, before rendering
WorkExecutionTime.LATE_UPDATE
Run at physics rate
WorkExecutionTime.FIXED_UPDATE
Run in Editor (edit mode)
WorkExecutionTime.EDITOR_UPDATE
Values
UPDATE
0
Update
updateRunner
PreUpdate (Append)
LATE_UPDATE
1
LateUpdate
lateUpdateRunner
PreLateUpdate (Append)
FIXED_UPDATE
2
FixedUpdate
fixedUpdateRunner
FixedUpdate (Prepend)
EDITOR_UPDATE
3
Editor tick
editorUpdateRunner
EditorApplication.update (50ms throttle)
Examples
Posting to Specific Phases
See Also
ParagonSynchronizationContext — routes continuations based on this enum
SynchronizationLoops — marker types for each frame phase
WorkRequest — the work unit executed during each phase
SynchronizationContext System — system overview
Last updated