Assets/_MolcaSDK/_VR/Scripts/Scenario/Steps/CodeInputStep.csBase: Step
Role
Completes when the trainee enters the expected code sequence (see Inspector for length, validation, and UI hooks). Often pairs with shared Modals / keyboard widgets.Code
CodeInputPanel.onCodeValidated → OnCodeValidated → ValidateCode; if valid, Complete(). Validation uses expectedCode only when useStepExpectedCode (panel-driven otherwise; onCodeValidated implies panel accepted input). autoShowPanel, showInVR + offset, hideOnComplete, resetOnActivate control UI.
Troubleshooting
- No CodeInputPanel — Assign or place
CodeInputPanelon/under the same GameObject; auto-find runs inInitialize. - Always invalid — If relying on step code, enable
useStepExpectedCodeand setexpectedCode(orSetExpectedCode). Otherwise configure the panel’s own expected code soonCodeValidatedonly fires when correct. - Panel not visible in HMD — Enable
showInVR, adjustvrPositionOffset, ensureCamera.mainexists for placement.
Related
- Step (base class)
- Shared UI — search
CodeInputPanelunder_MolcaSDK/Code/
Unity Editor
CodeInputStep + in-scene code panel.
