Skip to content

Commit

Permalink
Revert "Fix for issue Location Loader issue UnityTechnologies#229"
Browse files Browse the repository at this point in the history
This reverts commit c7d75ff.
  • Loading branch information
jandd661 committed Nov 28, 2020
1 parent c7d75ff commit 94bf03d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs
Expand Up @@ -66,7 +66,7 @@ private void LoadScenes(GameSceneSO[] locationsToLoad, bool showLoadingScreen)
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;
Expand Down Expand Up @@ -98,6 +98,7 @@ private void AddScenesToUnload()
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);
}
Expand All @@ -113,8 +114,8 @@ private void UnloadScenes()
//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>
Expand Down

0 comments on commit 94bf03d

Please sign in to comment.