コード例 #1
0
 void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode)
 {
     if (initialised)
     {
         if (SceneManager.GetActiveScene().name == "LevelLoading")
         {
             gameData = null;
             StartCoroutine(LoadNewSceneAsync(sceneToLoad));
         }
         else if (gameData != null && ResourceManager.LevelName != null && ResourceManager.LevelName != "")
         {
             LoadManager.LoadAssetsToScene(gameData);
             ResourceManager.LevelName = "";
         }
         else
         {
             SetObjectIds();
         }
         Time.timeScale           = 1.0f;
         ResourceManager.MenuOpen = false;
     }
 }