public void LoadScene(string name, ISceneSettings settings, bool restrictToSingleScene)
 {
     if (restrictToSingleScene &&
         (LoadedScenes.Any(p => p.Name == name) || ScenesQueue.Any(p => p.Name == name) ||
          Application.loadedLevelName == name))
     {
         return;
     }
     this.QueueSceneLoad(name, settings);
     this.ExecuteLoad();
 }
        public void LoadScene(string name, ISceneSettings settings, bool restrictToSingleScene)
        {
            if (restrictToSingleScene &&
                (LoadedScenes.Any(p => p.Name == name) || ScenesQueue.Any(p => p.Name == name) ||
//                 Application.loadedLevelName == name)) return;
                 UnityEngine.SceneManagement.SceneManager.GetSceneAt(UnityEngine.SceneManagement.SceneManager.sceneCount - 1).name == name))
            {
                return;
            }
            this.QueueSceneLoad(name, settings);
            this.ExecuteLoad();
        }
 public void QueueSceneLoadIfNotAlready(string sceneName, ISceneSettings settings)
 {
     if (LoadedScenes.Any(p => p.Name == sceneName) || ScenesQueue.Any(p => p.Name == sceneName) ||
         Application.loadedLevelName == sceneName)
     {
         return;
     }
     ScenesQueue.Enqueue(new SceneQueueItem()
     {
         Loader   = LoadSceneInternal(sceneName),
         Name     = sceneName,
         Settings = settings
     });
 }
        public void QueueSceneLoadIfNotAlready(string sceneName, ISceneSettings settings)
        {
            if (LoadedScenes.Any(p => p.Name == sceneName) || ScenesQueue.Any(p => p.Name == sceneName) ||
//			    Application.loadedLevelName == sceneName) {
                UnityEngine.SceneManagement.SceneManager.GetSceneAt(UnityEngine.SceneManagement.SceneManager.sceneCount - 1).name == sceneName)
            {
                return;
            }
            ScenesQueue.Enqueue(new SceneQueueItem()
            {
                Loader   = LoadSceneInternal(sceneName),
                Name     = sceneName,
                Settings = settings
            });
        }
 public void QueueScenesLoad(params SceneQueueItem[] items)
 {
     foreach (var item in items)
     {
         if (item.RestrictToSingleScene &&
             (LoadedScenes.Any(p => p.Name == name) || ScenesQueue.Any(p => p.Name == name) ||
              Application.loadedLevelName == name))
         {
             continue;
         }
         if (item.Loader == null)
         {
             item.Loader = LoadSceneInternal(item.Name);
         }
         ScenesQueue.Enqueue(item);
     }
 }