I am creating an app in WebGL. I have a loading scene that I am loading additively:
SceneManager.LoadScene("Loading Scene", LoadSceneMode.Additive);
It loads correctly.
Then after I finish loading everything, I remove the additive loading scene:
In the Editor, it unloads perfectly. However, in browser, via WebGL, it gets called, but does not unload. If I throw it in a coroutine and wait for 3 seconds, it does unload.
I have a two-part question:
- Why does waiting for 3 seconds before unloading fix the problem?
- What is the correct way to unload this scene so that there is not an arbitrary "Wait for seconds" in there?