Skip to main content
Namespace: MolcaSDK.VR.UI
File: Assets/_MolcaSDK/_VR/Scripts/Fade/VRFadeManager.cs
Type: RuntimeSubsystem (child on RuntimeManager prefab)
Uses a fade material with _FadeAmount (0 = clear, 1 = fully black). On non-additive scene loads, optionally fades from black after a short delay unless a managed load set SkipNextAutoFade.

When to use

Use VRFadeManager when you need:
  • Scene transition cover — automatic fade-in after single-scene loads (unless skipped).
  • Manual fades — black out before loading, or reveal after async work (coordinate with ScenarioSessionManager / loaders that call SkipNextAutoFade to avoid double fades).

Inspector setup

Subsystem must be active (IsActive); otherwise fade methods return early.

Code

Manual fade around your own scene load (call SkipNextAutoFade first if you also use single-mode LoadScene and want to avoid the built-in auto fade):
Pass a delegate that performs your LoadSceneAsync or Addressables load so you do not rely on a non-existent ToAwaitable helper. Snap opacity:

API (key members)

Troubleshooting

  • No fade, material error on init — Assign fade material on the subsystem; ensure _FadeAmount exists on the shader.
  • Double fade or flash on session-driven loads — Call SkipNextAutoFade before loads that already fade (e.g. session / loading manager flows).
  • FadeInAsync / FadeOutAsync return immediately — Another transition may be running (isTransitioning); or subsystem is inactive / not initialized.
  • Additive scenes — Auto fade bails for LoadSceneMode.Additive; use manual fades if you need overlay behavior.

Unity Editor

VRFadeManager on prefab with fade material reference.

VRFadeManager in Unity Inspector

VRFadeManager Inspector