浏览代码

Revert "Fix for issue Location Loader issue #229"

This reverts commit c7d75ff1da92b172333042e5e9df43a2a296ca03.
/main
jandd661 4 年前
当前提交
f0ace111
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 5
      UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs

5
UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs


if (!CheckLoadState(currentSceneName))
{
//Add the scene to the list of scenes to load asynchronously in the background
_scenesToLoadAsyncOperations.Add(SceneManager.LoadSceneAsync(currentSceneName, LoadSceneMode.Single));
_scenesToLoadAsyncOperations.Add(SceneManager.LoadSceneAsync(currentSceneName, LoadSceneMode.Additive));
}
}
_scenesToLoadAsyncOperations[0].completed += SetActiveScene;

Scene scene = SceneManager.GetSceneAt(i);
if (scene.name != _initializationScene.sceneName)
{
Debug.Log("Added scene to unload = " + scene.name);
//Add the scene to the list of the scenes to unload
_ScenesToUnload.Add(scene);
}

//Unload the scene asynchronously in the background
SceneManager.UnloadSceneAsync(_ScenesToUnload[i]);
}
_ScenesToUnload.Clear();
_ScenesToUnload.Clear();
}
/// <summary> This function checks if a scene is already loaded </summary>

正在加载...
取消
保存