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 WorkExecutionTime

Remarks

The mapping between WorkExecutionTime and Unity frame phases:

  • UPDATE — Runs during PreUpdate, before MonoBehaviour.Update(). Continuations posted here execute each frame.

  • LATE_UPDATE — Runs during PreLateUpdate, before MonoBehaviour.LateUpdate(). Used by Yield.WaitForEndOfFrame().

  • FIXED_UPDATE — Runs at the start of FixedUpdate, before MonoBehaviour.FixedUpdate(). Runs at the physics timestep rate. Used by Yield.WaitForFixedUpdate().

  • EDITOR_UPDATE — Only available in the Unity Editor. Runs on EditorApplication.update, throttled to ~20 Hz (50ms intervals). Used by Yield.WaitForEditorUpdate().

circle-info

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

Goal
Value

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

Value
Integer
Frame Phase
WorkRunner
PlayerLoop Injection

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

Last updated