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();
         }
     }
 }
 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();
 }
 private void Unload(SceneConfig config)
 {
     UnloadAsync(config.sceneName);
 }