Exemple #1
0
 private IEnumerator SceneChangeRoutine(SceneChangeStruct sceneChangeStruct)
 {
     if (sceneChangeStruct.unloadScene == "#")
     {
         if (lastLoadedScene != "")
         {
             yield return(StartCoroutine(UnLoadScenAsync(lastLoadedScene)));
         }
     }
     else if (sceneChangeStruct.unloadScene != "")
     {
         yield return(StartCoroutine(UnLoadScenAsync(sceneChangeStruct.unloadScene)));
     }
     if (sceneChangeStruct.loadScene != "")
     {
         yield return(StartCoroutine(LoadScenAsync(sceneChangeStruct.loadScene)));
     }
 }
Exemple #2
0
 public void ChangeScene(SceneChangeStruct sceneChangeStruct)
 {
     StartCoroutine(SceneChangeRoutine(sceneChangeStruct));
 }