Skip to main content
Folder: Assets/_MolcaSDK/_VR/Scripts/Device Manager/
Namespace: MolcaSDK.VR.DeviceManager
Type: RuntimeSubsystem on RuntimeManager

When to use

Use DeviceManager for kiosk / managed headset flows: check or activate a device against your backend, then FetchContent to deserialize ContentResponse into Scenario Data Config via SetFetchedContent. Pair with DeviceCheck as IPreloadCheck so loading waits until the device is valid. OrganizationId is exposed for session logic; set explicitly with SetOrganizationId when your activation flow provides it (Scenario session reads org context when present).

Inspector setup

All calls use SendAsync() on the assets; configure base URL / headers per HttpClient / asset defaults.

Code

After CheckDevice or successful ActivateDevice, the manager awaits FetchContent() internally (see source).

API (key members)

Troubleshooting

  • Always Error status — Inspect HttpResponse from activation/check in debugger; verify HttpRequestAsset endpoints and device API contract.
  • Home list still empty after successFetchContent must succeed and return JSON that deserializes to ContentResponse; confirm ScenarioDataConfig instance exists in scene/project.
  • ScenarioSessionManager.OrgId nullOrganizationId is only set if your flow calls SetOrganizationId or you extend DeviceManager to parse org from responses (current sample code leaves it to explicit setter).
  • Race with preload — Ensure DeviceCheck preload runs before UI that reads ScenarioDataConfig.

Unity Editor

DeviceManager component on prefab or bootstrap object; or Device Check UI in scene.

DeviceManager in Unity Inspector or device check UI

DeviceManager / device activation UI