Skip to content

Simulation and Presentation

Simulation answers questions such as “What time is it?” and “Where is the Sun?” Presentation turns those answers into skies, lights, environment settings, and clouds. Keeping them separate lets you run a context without rendering it, or choose a different presentation while the simulation continues.

The supplied combined prefab connects both sides for convenience. That convenience does not make a sky, camera, or light a prerequisite for the clock.

What a presentation group does

TunalPresentationGroup selects the context for inheriting presentation controllers beneath it. It does not own or initialize simulation systems, advance time, or pause a context.

In its Inspector, Context Source selects:

  • Explicit: use the assigned Tunal Context. Leaving the reference empty leaves the group's context-driven presentation unbound.
  • Automatic: use the local context or an inherited group/context, with a fallback for Tunal's conventional sibling hierarchy.

For a detached presentation hierarchy or multiple contexts, Explicit mode is usually the clearest choice: you can see exactly which simulation it will display.

Bind a separate presentation

  1. Create a simulation using Quick Start.
  2. Instantiate the supplied Presentation foundation prefab from Prefabs & Presets in the Welcome window. It is separate from the simulation-only prefab.
  3. Select its Tunal Presentation Group and choose Context Source > Explicit.
  4. Assign the simulation's TunalContext to Tunal Context.
  5. Enter Play Mode and check that the context has initialized and the group's binding is correct.

Binding establishes where controllers obtain simulation state. Visible results still require valid controller resources, required modules, and a compatible rendering configuration. Use Single Context as the authored visual reference; this is not a full rendering setup tutorial.

Binding precedence

For controllers derived from PresentationBehaviour, a controlling enabled presentation group takes precedence over the controller's own context override. Outside a group, an explicit controller reference can be used; otherwise hierarchical discovery applies.

The conventional fallback recognizes an ancestor context, or a Presentation branch whose parent also contains a Systems child with the context. It does not search the whole scene and guess between unrelated worlds. If you rearrange or rename that sibling layout, assign an explicit group binding instead of relying on discovery.

Nested automatic groups can inherit their parent group's context. An explicitly bound nested group or a closer context creates a separate binding scope. A disabled group is no longer authoritative; disabling its component is not the same operation as deactivating its whole GameObject hierarchy.

Refreshing and visibility

The group's Refresh Presentation Bindings button re-evaluates active inheriting presenters. At runtime, SetContext(context) selects an explicit binding, and ResetToParentContext() returns the group to Automatic mode.

Changing a binding changes the simulation a consumer reads. It does not move systems between contexts or reset their state. Showing/hiding entire presentations is the responsibility of the context switcher.

Some presentation controllers affect scene-global settings such as RenderSettings. Independently simulated contexts do not create independent scene-global skies or environment settings. Use one selected presentation with the supplied switcher pattern rather than assuming several active rigs cannot interfere.

If presentation is unbound

Check the group's source mode and reference, the owning context's initialization and module status, and the controller's required resources. A per-controller override will not fix a wrong controlling group assignment.