Skip to content

Object time groups ​

Objects have a Time group control under Interaction. The default is gameplay; presentation and ui are available for effects and menu controllers. The field is saved with scenes and prefabs and participates in overrides and undo.

csharp
class PauseMenu : Component {
  void Start() { Time.SetGroup("ui"); }
  public void Pause() { Time.PauseGroup("gameplay"); }
  public void Resume() { Time.ResumeGroup("gameplay"); }
}

Bind the menu buttons directly to these public actions. The controller belongs to ui so its actions remain available while gameplay is paused. Assign an effect object to presentation to let its animation and cleanup finish during that pause. Time.SetGroup changes the whole object, including sibling components. It does not recursively change child objects. Time.Group reads the current group. Changing groups preserves the object's elapsed time and existing deadlines, even when the groups have spent different amounts of time paused; future time advances with the new group.

Time.IsGroupPaused("gameplay") reads the requested pause immediately. Automatic simulation commits pause/resume requests at the next shared frame boundary, before input or any object's Update. A request inside Update completes the current frame uniformly, regardless of scene order. Tap hooks and direct button actions reject a target whose group has a pending pause; explicit script method calls, committed Health events, cancellation, and lifecycle cleanup still run.

WorkClock
Script Update, owned waits/continuations, native Motion and Sprite AnimatorObject group
Authored Motion clips and skeletal clips, including markersObject group
Time.Time / Time.Elapsed, component runtime timestampsObject group; excludes paused time
Rapier and FixedUpdateGlobal gameplay clock; FixedUpdate also respects the object's paused group
Flow Tick and Flow timersGameplay
Particle effects and celebration decayPresentation
Speech bubble lifetimeGameplay
UI binding evaluation, layout, rendering, navigationRemain available; button target actions respect their object's group

Physics is a single simulation: assigning a body to presentation does not give it a separate physics clock. Pausing gameplay preserves bodies, their displayed poses, and fractional fixed-step time. It does not accumulate paused wall time or produce a catch-up burst on resume. Time.SimulationTime and Time.Frame retain their shared physics/frame meanings. See the phase contract.

Pause state and object clocks are scene-local and clear on scene entry, Stop, and restart. Stop cleanup reads the final elapsed time before clocks and pause requests are cleared. Group names are restricted to the three values above; an unknown name reports a script error. Existing projects default to gameplay and need no data migration.