- Home /
Loading screen animation is getting stuck for a second randomly when using LoadLevelAsync !
I'm loading a loading screen with LoadLevelAsync to load another level but during that time the animation for the loading screen is getting randomly stuck and resumes again is there any way to play the animation continuously without the lag ?
Answer by DiegoSLTS · May 23, 2016 at 04:49 PM
That's a REALLY common issue, search a bit more and you'll find a lot of answers. The problem with LoadLevelAsync is that it loads the level asynchronously as the name suggests, but loading the scene (reading the file and parsing it) is not the same as creating all the objects for that scene. That's where you get "freezes", Unity has to create a lot of things that can't be don asynchronously.
You can try creating your scenes so they load asynchronously by themselfs (i.e. instead of having everything at once, create the objects from a Start coroutine of some custom object that loads the scene). This way you can create objects in different frames, or you can create a certain amount of objects per frame, or you can load a big level room by room while the player moves.
Your answer
Follow this Question
Related Questions
Button animator not playing. 0 Answers
How to make Animation and Physics work together? 2 Answers
Syncing multiple animations over the network (LAN) (UNET) 0 Answers
Animation doesn't play correctly 3 Answers