- Home /
Cancel loading a level using LoadLevelAsync?
Is there any way to cancel loading a level using LoadLevelAsync?
Answer by landon912 · Sep 27, 2015 at 04:48 PM
No, the only way would be to allow the Async loading to complete and then immediately reload the scene you were in.
Another option if you need the current level to persist, would be using LoadLevelAdditiveAsync and have all objects in the new scene under a parent empty. Then if you decide you no longer want the new scene, you can delete that parent empty and the original level will persist.
However, there is no way to stop loading a level.
Answer by NareshKhandla · Feb 07, 2021 at 04:41 PM
I have worked the below trick and resolved this issue, Reload the previous scene, after that, your async scene will be deleted/removed automatically.
public void Cancel_Button()
{
SceneManager.LoadScene("SceneName");
}