Skip to main content

Shared module

Folder: Assets/_MolcaSDK/Code/Scripts/Preload/
Namespace: MolcaSDK.Preload

When to use

Use PreloadCheck for a dedicated preload scene: branding splashes, sequential gates (EULA, device, token, content), then load the main scene and optionally unload the preload scene. Use VRPreloadCheck for the same child-list pattern in VR bootstrap scenes (e.g. with DeviceManager).

VR

VRPreloadCheckAssets/_MolcaSDK/_VR/Scripts/UI/VRPreloadCheck.cs — same child IPreloadCheck pattern for Preload VR scene.

Code

Each gate implements IPreloadCheck and runs async work in RunCheck() (see FirstLaunchCheck in the same folder):
Wire PreloadCheck / VRPreloadCheck in the Hierarchy so customChecks list order matches your intended gate sequence (Inspector order is sequential — not child transform order unless you copy that into the list).

Troubleshooting

  • Check never runs — The component must be listed under customChecks on PreloadCheck and implement IPreloadCheck; otherwise you get “does not implement IPreloadCheck” warning and it is skipped.
  • Stuck on splashRunSplashScreensAsync / fade may hang if CanvasGroup references are wrong or holdDuration extreme; background must be valid for FadeOut.
  • Next scene wrongautoLoadNextScene uses LoadNextSceneWithCallback from SceneLoadManager — verify Molca scene flow / queue configuration.
  • VR duplicate logic — Prefer DeviceManager as IPreloadCheck via DeviceCheck rather than duplicating HTTP in a random MonoBehaviour.

Unity Editor

Vr Preload Check Hierarchy

Preload scene with VRPreloadCheck children