//Prevent a double-loading, for situations where the player falls in two Exit colliders in one frame
if(_isLoading)
return;
_isLoading=true;
//In case we are coming from a Location back to the main menu, we need to get rid of the persistent Gameplay manager scene
if(_gameplayManagerSceneInstance.Scene!=null
{
//Save loaded scenes (to be unloaded at next load request)
_currentlyLoadedScene=_sceneToLoad;
SetActiveScene();
Scenes=obj.Result.Scene;
SceneManager.SetActiveScene(s);
LightProbes.TetrahedralizeAsync();
_isLoading=false;
{
}
}
/// <summary>
/// This function is called when all the scenes have been loaded, to finalise loading and activate the main scene, and rebuild LightProbes as tetrahedrons.