Skip to main content
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
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)

Auxiliary types (summary)

TypeRole
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.

Unity Editor

Step Inspector — Auxiliaries list with + to add StepScoringAuxiliary.

Unity Inspector Step auxiliaries list