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))); } }
public void ChangeScene(SceneChangeStruct sceneChangeStruct) { StartCoroutine(SceneChangeRoutine(sceneChangeStruct)); }