ActivityField

One field on an ActivityEvent. Read-only or writable; numeric fields can carry min/max validation.

public class ActivityField

Inheritance System.Object → ActivityField

Properties

CurrentValue

The field’s starting value: the writer-authored default when one is set, otherwise the live variable value at activity-fire time.

public object CurrentValue { get; }
Property Value

System.Object

HasValue

True once the field has been set via Value. Mandatory fields must reach this state before Complete().

public bool HasValue { get; }
Property Value

System.Boolean

Id

Display label — human-id form. Used in expressions, UI, locale keys; renameable.

public string Id { get; }
Property Value

System.String

Mandatory

True when Complete() requires a value to be set first. An authored default does not satisfy this — SetField(string, object) still must be called explicitly.

public bool Mandatory { get; }
Property Value

System.Boolean

Max

Maximum allowed value (numeric fields). Null when unconstrained.

public object? Max { get; }
Property Value

System.Object

Min

Minimum allowed value (numeric fields). Null when unconstrained.

public object? Min { get; }
Property Value

System.Object

ReadOnly

True when the field is displayed only (no SetField mutation allowed).

public bool ReadOnly { get; }
Property Value

System.Boolean

Uuid

Canonical key — matches StoryBonsai.Runtime.Models.ActivityVariable.VariableUuid. Stable across writer-renames of Id.

public string Uuid { get; }
Property Value

System.String

Value

Current field value — the value set via this property if any, else CurrentValue. Setter validates against Min/Max and rejects read-only fields.

public object? Value { get; set; }
Property Value

System.Object

Remarks

Studios commonly persist a default into the variable store by writing field.Value = field.CurrentValue on submit when no player input occurred.

Docs last synced: 2026-07-08
Screenshot viewer