File:Documentation Index
Fetch the complete documentation index at: https://docs-unity.molca.id/llms.txt
Use this file to discover all available pages before exploring further.
Assets/_Molca/_Core/Sequence/Step/Step.csNamespace:
Molca.Sequence
Status
StepStatus: Inactive, Active, Completed.
Completion
IsCompleted is true only when the step is internally complete and all child steps are complete.
Identity and telemetry
RefId/RefType("Step") for the Reference system.StepId(int) — correlate with backend scoring when using Step scoring auxiliary.
Events
OnStepBegin, OnStepEnd (UnityEvent), OnStatusChanged, StartTime / EndTime.
Auxiliaries
[SerializeReference] List<StepAuxiliary> — see Core Sequence/Auxiliary/ and VR step auxiliaries.
In VR training, the StepInfo auxiliary (and subclasses for extra fields) supplies step titles used by Scenario UI task lists and modal copy — not just optional scoring/haptics.
VR subclasses
Training steps inAssets/_MolcaSDK/_VR/Scripts/Scenario/Steps/ — see the VR steps section in navigation.
Typical custom / VR step (code)
VR steps inheritStep, wire [SerializeField] for designers, subscribe in OnStepActivated, and call Complete() when the training rule is satisfied (dispatches Step.Completed / Step.FullyCompleted via EventDispatcher).
*.cs under _MolcaSDK/_VR/Scripts/Scenario/Steps/.
API Reference
| Method | Signature | Description |
|---|---|---|
OnStepActivated | protected virtual void OnStepActivated() | Called when the step becomes active — override to initialize step-specific logic, subscribe to events, or reset state |
OnStepDeactivated | protected virtual void OnStepDeactivated() | Called when the step becomes inactive — override to clean up resources, unsubscribe from events, or save state |
UpdateStep | public virtual void UpdateStep() | Called every frame while the step is active — override to implement per-frame logic like timers or condition checks |
Complete | protected void Complete() | Mark the step as completed and dispatch Step.Completed / Step.FullyCompleted events via EventDispatcher to advance the sequence |
Fail | protected void Fail() | Mark the step as failed — dispatches failure events and may trigger retry logic depending on sequence configuration |
Reset | public virtual void Reset() | Reset the step to its initial state — called when restarting a sequence or retrying a failed step |
Related
- Recipe: Set up a basic sequence — step-by-step guide to creating a SequenceController with custom steps
Unity Editor
