Пример #1
0
 public void Unload(string sceneName, Action onComplete)
 {
     if (AdditiveScenesLoader.TryGetLoadedScene(sceneName, out var scene))
     {
         AdditiveScenesLoader.Unload(scene, onComplete);
     }
     else
     {
         // TODO error and optional param with scene action stack
         onComplete?.Invoke();
     }
 }
Пример #2
0
 public void Unload(string sceneName, Action onComplete)
 {
     if (AdditiveScenesLoader.TryGetLoadedScene(sceneName, out var scene))
     {
         var sceneDelegate = FindMonoTypeOnSceneRoot <ISceneDelegate>(scene);
         sceneDelegate?.OnSceneUnload();
         AdditiveScenesLoader.Unload(scene, onComplete);
     }
     else
     {
         // TODO error and optional param with scene action stack
         onComplete?.Invoke();
     }
 }