in the ARFoundation Unity samples I found the following code snippet:
public void BackButtonPressed()
{
if (Application.CanStreamedLevelBeLoaded("Menu"))
{
SceneManager.LoadScene("Menu", LoadSceneMode.Single);
LoaderUtility.Deinitialize();
}
}
Can somebody please explain to me when and why to use Application.CanStreamedLevelBeLoaded(String string)? In the Unity docs I found this as explanation: Can the streamed level be loaded?
But that tells me nothing.
And when and why should one also use LoadSceneMode.Single and LoaderUtility.Deinitialize()?
I found this for LoaderUtility.Deinitialize(): Deinitializes the currently active XR Loader, if one exists. This destroys all subsystems.
I appreciate any help. Thanks!