Optimize the code

This commit is contained in:
CroakFang
2023-07-08 22:41:47 +08:00
parent 5ce66189ee
commit 30a6e8d5f7
4 changed files with 146 additions and 146 deletions
+2 -2
View File
@@ -44,13 +44,13 @@ public class UmaSceneController:MonoBehaviour
// Wait until the last operation fully loads to return anything
yield return new WaitUntil(()=> asyncLoad.isDone);
OnSceneloaded.Invoke();
OnSceneloaded();
// Unload the previous Scene
AsyncOperation asyncUnLoad = SceneManager.UnloadSceneAsync(currentScene);
yield return new WaitUntil(() => asyncUnLoad.isDone);
OnLastSceneUnloaded.Invoke();
OnLastSceneUnloaded();
animation.Play("SceneTransition_e");
yield return new WaitUntil(() => !animation.isPlaying);