Assets/_MolcaSDK/_VR/Scripts/Scenario/Home/Namespace:
MolcaSDK.VR.Scenario.HomePrimary type:
HomeUIManager
Runs on the home / simulation selection screen: toggles by module vs by scenario, builds cards from Scenario Data Config, and respects fetched scenario IDs when the session has loaded server content (see Session loading & events).
When to use
UseHomeUIManager when you need a data-driven lobby that lists org scenarios/collections after authentication, supports filtering (FilterPanelUI), and drills into module or scenario detail panels before launching training.
Inspector setup (HomeUIManager)
| Section | Fields |
|---|---|
| View mode | By module / By scenario / Filter buttons; default view mode enum. |
| Main panel | Root object for the home UI. |
| Content | Scenario list container, module grid container, scenario list panel, module grid panel. |
| Prefabs | Scenario card, module card. |
| UI | Filter panel (FilterPanelUI), module detail (ModuleDetailUI), scenario detail (ScenarioDetailUI). |
| Audio | Optional AudioReference for lobby BGM (plays in Start if assigned). |
Start awaits RuntimeManager.WaitForInitialization(), then LoadScenarioData() reads ScenarioDataConfig.GetInstance(). If FetchedScenarios is non-empty, only scenarios whose ScenarioId appears in fetched rows remain visible.
Code
Force a view mode from another UI controller:ScenarioDataConfig asset exists and session has populated FetchedScenarios before showing the home scene, or the list may be empty after filtering.
Troubleshooting
[HomeUIManager] ScenarioDataConfig not found!— Create/configure the config asset and ensureGetInstance()resolves in this scene (Scenario Data Config).- Empty list after login —
FetchedScenariosmay filter out everything; verify API IDs matchBaseScenarioData.ScenarioIdin the config. - Buttons do nothing — Assign by module / by scenario / filter references;
SetViewModeonly toggles panels when references are non-null. - No BGM —
bgmReferenceoptional; check audio setup if assigned but silent.
Related
- Scenario Data Config — collections, scenarios, fetched list
- Session loading & events — content timing
- Scenario session manager — auth before home
- Modal manager — shared modal patterns used in SDK flows
Unity Editor
Home VR scene — canvas / HomeUIManager in Inspector.
