public static async Task LoadSceneAsync(this SceneTransitionSystem transitionSystem, string sceneName, ITransitionPresenter oneTimePresenter, LoadSceneMode mode = LoadSceneMode.Single) { transitionSystem.AddPresenter(oneTimePresenter); await transitionSystem.LoadSceneAsync(sceneName, mode).ConfigureAwait(true); transitionSystem.RemovePresenter(oneTimePresenter); }
public static async Task LoadScenesAsync(this SceneTransitionSystem transitionSystem, string[] scenesToLoad, ITransitionPresenter oneTimePresenter) { transitionSystem.AddPresenter(oneTimePresenter); await transitionSystem.LoadScenesAsync(scenesToLoad).ConfigureAwait(true); transitionSystem.RemovePresenter(oneTimePresenter); }
public static async Task LoadScenesAsync(this SceneTransitionSystem transitionSystem, string[] loadScenes, ITransitionPresenter oneTimePresenter) { transitionSystem.AddPresenter(oneTimePresenter); await transitionSystem.LoadScenesAsync(loadScenes); transitionSystem.RemovePresenter(oneTimePresenter); }
private void OnDisable() { sceneTransitionSystem.RemovePresenter(this); }