ChoiceSet

Result of GetChoices() — the visible choices this step, plus completion / leave-availability hints. When IsComplete is true the run is over and Choices is empty.

public class ChoiceSet

Inheritance System.Object → ChoiceSet

Remarks

Freshly allocated on every GetChoices() call — the runtime never reuses an instance, so it is safe to hold a reference across a render frame but never across a step-advancing call (SelectChoice(string), EnterScene(string, bool), etc.).

A typical host loop reads Choices + Groups, optionally wires a timer against Timeout + DefaultChoice, and surfaces a “Leave” affordance when LeaveAvailable is true (driving LeaveScene()).

See Also

Properties

Choices

Ungrouped choices visible this step, in author / priority order. Use Uuid to commit a selection via SelectChoice(string).

public List<Choice> Choices { get; }
Property Value

System.Collections.Generic.List<Choice>

DefaultChoice

First choice across Choices and Groups with IsDefault set, or null when no default is authored. Used by the runtime when Timeout elapses.

public Choice? DefaultChoice { get; }
Property Value

Choice

Groups

Choices bundled into authored choice groups. Each GroupedChoice carries its own Presentation hint (e.g. dropdown, fullscreen) so the renderer can pick a UI strategy per group.

public List<GroupedChoice> Groups { get; }
Property Value

System.Collections.Generic.List<GroupedChoice>

IsComplete

True when the project has finished (a completeProject event fired during the last step). End the run UI flow instead of presenting choices; Choices and Groups are empty in this case.

public bool IsComplete { get; }
Property Value

System.Boolean

LeaveAvailable

True when the current top scene-stack frame’s resolved modality is non-modal — the renderer should surface a “Leave” affordance that calls LeaveScene(). False when no frame is on the stack (the player is at a location with no encounter started), or when the active frame is modal and must be resolved before leaving.

public bool LeaveAvailable { get; }
Property Value

System.Boolean

Timeout

Set-level timeout, in seconds, after which DefaultChoice auto-selects if the player hasn’t committed. Null when the set carries no timeout. Individual Timeouts may also apply.

public Nullable<float> Timeout { get; }
Property Value

System.Nullable<System.Single>

Docs last synced: 2026-07-08
Screenshot viewer