_MolcaDT).
Script: Assets/_MolcaSDK/_VR/Scripts/Scenario/Data/ScenarioData.csType:
ScriptableObject (registered in Scenario Data Config collections)
When to use
UseScenarioData (or its subclasses SimulationScenarioData / TourScenarioData) to define a VR training scenario:
- Scenario metadata — name, description, image, tags, time limits
- Activity definitions — ordered list of
ScenarioActivityDataentries - Scene loading —
SceneLoadPlanfor single-player and per-role multiplayer configurations - Launch options — execution mode support (Training/Assessment), config options
- Multiplayer roles — role definitions and per-role scene plans
ScenarioSessionManager or Home UI.
Role
ScenarioData is the authoring asset that defines everything about a scenario:
- Metadata — displayed in Home UI, used for filtering/search
- Activities —
ScenarioActivityDataentries matched to runtimeScenarioActivitycomponents byRefId - Scene loading —
SceneLoadPlanstructure executed bySceneLoadPlanExecutorto load ordered multi-scene setups - Multiplayer — role definitions and per-role scene configurations
- Backend integration —
ScenarioId(org ID) links to backend scenario records
Inspector setup
Basic metadata
Launch configuration
Activities
Roles (multiplayer only)
Scene loading
Single Player Plan
Role Scene Mappings (multiplayer only)
SceneLoadPlan structure
TheSceneLoadPlan defines ordered multi-scene loading with synchronization:
Load order
preloadScenes[0]loads as Single (becomes active scene)- Wait for
preloadScenes[0].waitForRefIds(or 2 frames if empty) preloadScenes[1..n]load as Additive (each waits for its RefIds)scenarioSceneloads as Additive (when preloads exist) or Single (no preloads)
SceneEntry fields
Each scene entry has:Code
Get scene load plan
Access metadata
Check for legacy data
Set organization scenario ID
Scene loading examples
Simple single scene
Environment + scenario (two scenes)
Addressable scenes
Multiplayer with role-specific scenes
API reference
Properties
Methods
Troubleshooting
- Scenario not found at runtime: verify the asset is registered in Scenario Data Config collections. Check
RefIdmatches the lookup key. - Scene doesn’t load: confirm
scenarioScenehas eithersceneNameorsceneReferenceset. For Addressables, verify the scene is marked as Addressable and the key is valid. CheckSceneLoadPlan.IsValid. - Preload scenes load out of order: preload scenes load sequentially by array index. Index 0 always loads as Single (active scene); subsequent entries load Additive.
- Scene loads but objects missing: check
waitForRefIdson preload scenes. The executor waits up to 15 seconds for those RefIds to be registered inReferenceManager. Check console for timeout warnings. - Multiplayer role scene not found: verify
roleSceneMappingscontains an entry with matchingroleId. Check that the role’sSceneLoadPlan.IsValid. - Activities don’t match runtime components: ensure
ScenarioActivitycomponents in the scene haveactivityIdmatchingScenarioActivityData.RefId. Mismatches log warnings. - Legacy scene fields not migrating: call
MigrateLegacySceneFields()in editor. Check thatsinglePlayerPlanis empty before migration (migration only runs when plan is invalid). - Time limit not enforced: verify
TimeLimitSeconds > 0and Scenario Manager is active. Time limit is checked inScenarioManager.Update().
Related
- Scenario Data Config — SettingModule that registers scenario collections
- Scenario Manager — runtime state machine that executes scenarios
- New scenario quick start — step-by-step guide for creating scenarios
- Recipe: Set up a VR scenario — complete scenario setup workflow
- Session loading and events — how sessions load scenario scenes
- Scenario Activity — runtime activity component that matches
ScenarioActivityData
Unity Editor

ScenarioData Inspector — metadata, activities, and scene loading configuration
Migration from legacy fields: If you have existing scenario assets created before the
SceneLoadPlan refactoring, they contain hidden legacy fields (sceneName, singlePlayerSceneName, environmentSceneName, etc.). These are automatically migrated to singlePlayerPlan when accessed at runtime. For editor migration, call MigrateLegacySceneFields() in a custom editor script or inspector.