Assets/_MolcaSDK/_VR/Scripts/Scenario/Steps/EnvironmentChangeStep.csBase: Step
Role
Listens toEnvironmentHelper.onEnvironmentChanged. When the reported index equals environmentIndex, calls Complete(). FindFirstObjectByType<EnvironmentHelper>() is used on activate/deactivate — exactly one active helper should exist.
Code
Troubleshooting
- Never completes — No
EnvironmentHelperin scene, event never fires, or index mismatch vsenvironmentIndex. - Wrong environment completes step — Align
environmentIndexwith the helper’s indexing (0-based vs 1-based). - Multiple helpers —
FindFirstObjectByTypebinds arbitrarily; keep a single helper or replace with an injected reference in a fork.
Related
- Step (base class)
- Search
EnvironmentHelperin SDK for API
Unity Editor
EnvironmentChangeStep with target environment references.
