Skip to main content

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.

Folder (auxiliary types): Assets/_MolcaSDK/_VR/Scripts/Scenario/Steps/Auxiliary/
Related UI (not under Auxiliary/): AnalogFeedbackUI, ProgressFeedbackUI, ValveFeedbackUI under Scenario/Steps/ (and a second ValveFeedbackUI under Scripts/UI/ for alternate wiring — search the project).
All StepAuxiliary types are added on each Step via the SerializeReference / Auxiliaries list in the Inspector (menu paths come from [AuxiliaryMenu(...)] on each class).

When to use

NeedUse
Step title (and often description) for HUD task lists + modalsStepInfo auxiliary — see below
Per-step points / time / binary scoring + optional session postStepScoringAuxiliary
Pulses or continuous buzz on begin / complete / resetVRHapticAuxiliary
Floating labels + button rim highlights on controllersVRControllerInfoAuxiliary
Different UnityEvents for tutorial vs training vs assessmentStepModeAwareEvent
Radial / text feedback for valve, knob, gazeAnalogFeedbackUI, ProgressFeedbackUI, ValveFeedbackUI (referenced from ValveStep / KnobStep / LookAtStep via SceneObjectReference)

StepInfo (task list + copy)

StepInfo is a StepAuxiliary (same Auxiliaries list on Step) that holds the human-facing title and related copy for a step.
  • Scenario UI — in-scenario HUD often includes a task / checklist UI: it walks the active steps (via the running SequenceController / ScenarioActivity) and shows each step’s StepInfo title as a row so trainees see what to do next and what’s already done.
  • Modals — steps such as Popup step read StepInfo for title/body text on confirmation dialogs.
  • Subclasses — you can derive from StepInfo to add fields (extra labels, icons, CSV-imported metadata). CSV Step Importer supports a custom StepInfoType and RegisterExtraColumnMapping so imported steps get your derived auxiliary. Scenario UI and importers that cast to your type can show the extra data; the stock task list typically relies on the base title (and localization) from StepInfo.
Add StepInfo through Auxiliaries → the menu entry your SDK exposes (often under a VR / Scenario or Info path). Keep titles localized (e.g. DynamicLocalization) when the task list and modals use the same keys as the rest of the UI.

Auxiliary types (summary)

TypeRole
StepInfoTitle/description (and subclasses for extra fields); feeds Scenario UI task-list rows and modal copy (Popup step).
StepScoringAuxiliaryEmbedded ScoringConfig; OnStepUpdate refreshes time-based scores; FinalizeScore on complete/end; optional PostStepScoreAsync.
VRHapticAuxiliaryHapticImpulse[] via HapticImpulsePlayer on VRPlayerManager controller visuals (or scene fallback by name). Optional continuous haptics until complete.
VRControllerInfoAuxiliaryInfoDisplayUtility + VRInfoDisplay[] (hand, button, DynamicLocalization, optional prefab). Toggles controller appearance mode and SetButtonRim while active.
StepModeAwareEventbeginExecutionModes / completeExecutionModes flags vs ScenarioDataConfig.ExecutionMode; invokes UnityEvent when mode matches.

Code

Add an auxiliary in the Editor — expand the Step component → Auxiliaries → add VR/Haptic Feedback, VR/Controller Info, VR/Scenario/Mode Event, or Scoring/Step Scoring. No code required for haptics or mode events if you wire impulses / UnityEvents in the Inspector. Runtime: drive binary / accuracy scoring (e.g. from a custom script listening to your own validation):
using MolcaSDK.VR.Scenario.Scoring;

// step = hosting Step MonoBehaviour
var aux = step.GetAuxiliary<StepScoringAuxiliary>();
aux.SetCorrect();           // binary
aux.SetAccuracy(0.85f);     // 0–1 for Accuracy type
aux.SetAccuracyPercent(85f);
Analog / progress UI — steps call AnalogFeedbackUI.Setup(IAnalogInteraction, target, start) then Show() / Hide(); ProgressFeedbackUI.SetProgress(0..1) from gaze dwell.

Troubleshooting

  • Auxiliary never runs — Confirm it lives on the same Step instance the SequenceController activates; check IsEnabled on the auxiliary instance if your version exposes it (StepModeAwareEvent bails when disabled).
  • VRHapticAuxiliary: no channels — Add HapticImpulsePlayer to VRControllerVisual children or ensure controller objects include left/right in the name for fallback search.
  • VRControllerInfoAuxiliary: no popups — Place InfoDisplayUtility in the scene; localizedInfo must not be disabled; GetButtonTransform must exist for the chosen VRControllerVisual.ButtonType.
  • Mode event never firesScenarioDataConfig.GetInstance() must return config with expected ExecutionMode; masks must include that mode in begin / complete flags.
  • Analog UI blank — Call Setup before Show; IAnalogInteraction must be the live valve/knob; radial Image must use Filled + Radial per inspector tooltips.
  • Task list shows wrong or empty titles — Each listed step needs a StepInfo auxiliary with title (and localization) set; confirm Scenario UI references the same SequenceController / activity the player is training on.

Unity Editor

Step Inspector — Auxiliaries list with + to add StepScoringAuxiliary.

Unity Inspector Step auxiliaries list