- Home /
gap between scene loading and scene start
right now I am testing SceneManager.LoadSceneAsync - it loads up to certain point and then whole game freezes for some time
the AsyncOperation.progress goes from 0 to 0.9, then, if AsyncOperation.allowSceneActivation is true it starts the scene (after the gap) or you have to set it true and then it starts
during the gap the application is so deep frozen that even profiler stops working when profiling build
the question is:
is there way how to get rid of this gap after loading but before scene initialisation?
and if not, is there at least way how to show progress of this process?
additional / conditional question: if there's no way how to make fluent / seamless level loading and initialisation using SceneManager.LoadSceneAsync (or Application.LoadLevelAsync) so how is best way to do it for 2D game with big background tiles and many layers of big parallax tiles and many connected interactive objects which have to start to work at the same time because they all depend on each other and we have it all in scenes already as the seamless request came later as change in plan?
The way Unity prevents the next scene from loading when you set allowSceneActivation to false is that it stop loading the next level at 0.9 or 90% so I imagine the gap you're talking about is the game loading the last 10%
I haven't quite gotten the opportunity to play around with the Scene$$anonymous$$anager as much as I'd like, but what happens if you try loading the level asynchronously with allowSceneActivation set to true, and the mode set to additive? This should load the second scene without unloading your current scene. Then later, when it is appropriate, you can unload your first scene.
there's always the gap even if it's additive/async i suspect it's not loading what's going on during the gap i think it's the scene initialisation - creating of objects and starting them up and i am looking for workaround - something like picking gameobjects one by one during few seconds or so, however everything is failing so far
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How can I get a split-up sound to properly loop with an animation? 1 Answer