- Home /
LoadLevelAsync hiccups on scene switch
I am trying to make a loading animation while using LoadLevelAsync to load the next scene.
The loading animation is a loading circle that continuously rotates in the middle of the screen, and I use LoadLevelAsync("NextScene") in the code. The problem is that every time right before the scene switch happens the circle will freeze for a few milliseconds before the next scene appears.
I do know that the less things the next scene contains, the shorter the freeze is, but I thought that LoadLevelAsync's purpose was for letting the user experience no lag during scene transitions. My next scene contains a background sprite, some buttons, scripts, and a 3MB audio file. The screen will always freeze for half a second before showing the next scene.
I am using Unity 4.6.3 with Pro feature. I'm also testing the results on a device. I have also tried out the AsyncOperation.allowSceneActivation with Coroutines, and unfortunately they don't work.
If anyone has a solution, or has any suggestions on smooth scene transitions, I would greatly appreciate them.
Thanks in advance.
There is unfortunately no way to avoid Async loading hiccups in 4.X... In 5 they are less noticeable, but still there. Also, they are less noticeable in a build than in the Editor, if that can be of any help.
I did achieve seamless loadings in my project, but not with this function. I recently started using SECTR (asset store) in order to stream chunks (terrains) of my levels at runtime with no hiccups.
In your case I would suggest loading your assets separately one after the other. This way you spread the instantiation overhead over multiple frames and therefore avoid the hiccups.
Thanks for the reply alexandre! I guess I will need a custom runtime object loader/deleter then. Thank you very much!
Your answer
Follow this Question
Related Questions
Using parameters of activeSceneChanged? 0 Answers
Scene freezes after loaded 1 Answer
Scene loader Toutorial 0 Answers
Scenes are stuck at (isloading) when using LoadSceneAsync 2 Answers