예제 #1
0
 private void Load(SceneConfig config)
 {
     if (config.isDependency)
     {
         LoadAsync(config.sceneName);
     }
     else
     {
         var loaded = loadedScenes[config.type];
         if (loaded != config.sceneName)
         {
             if (loaded == none)
             {
                 LoadAsync(config.sceneName);
             }
             else
             {
                 Unload(loaded, delegate {
                     LoadAsync(config.sceneName);
                 });
             }
         }
         else
         {
             CheckAllLoaded();
         }
     }
 }
예제 #2
0
 private void LoadRest(SceneConfig sceneConfig, System.Action callback)
 {
     PrepareLoad(callback);
     Load(sceneConfig);
     if (sceneConfig.dependencies != null)
     {
         foreach (var dependency in sceneConfig.dependencies)
         {
             Load(GetSceneConfig(dependency.sceneName));
         }
     }
     PrepareFinishLoad();
 }
예제 #3
0
 private void Unload(SceneConfig config)
 {
     UnloadAsync(config.sceneName);
 }