changescenewithfade - eisclimber/ExPresS-XR GitHub Wiki

RuntimeUtils.ChangeSceneWithFade(ExPresSXRRig,int,bool,Action)

Method in RuntimeUtils

Summary

Changes a scene whilst the current rig is faded out. Supports 'DontDestroyOnLoad' if enabled on the rig. If no rig is provided or it does does not have a fade Rect the Scene will change instant.

public static void ChangeSceneWithFade(ExPresSXRRig rig, int sceneIdx, bool keepRig, Action sceneLoadedCallback)

Parameters

Name Description
ExPresSXR.Rig.ExPresSXRRig rig The rig that is will be attempted to fade.
int sceneIdx The Scene index to change to (from the build settings).
bool keepRig Whether or not the rig should be kept after loading the new scene.
System.Action sceneLoadedCallback A callback that will be executed after the new scene loaded. Can be null.
⚠️ **GitHub.com Fallback** ⚠️