Use-case scenario:
-
Scene is loading using SceneManager.LoadSceneAsync (loading is not complete yet)
-
Suddenly we need to stop the loading of that scene, so we try to use:
AsyncOperation asyncOperation = SceneManager.UnloadSceneAsync(scenePath);
But the returned asyncOperation is NULL!
Questions:
-
How can we stop loading of a scene?
-
Alternatively, how can we unload a loading scene?
UPDATE1:
Further tests made. Decided to wait for LoadSceneAsync to complete (to avoid the null-return of AsyncOperation), and once it completes, scheduled to start automatic UnloadSceneAsync. That call to UnloadSceneAsync does return non-null AsyncOperation (good part), but the operation (unloading) NEVER finishes (bad part)!
Help Anyone! Is this a Unity bug? Is there are workaround?