- Home /
LoadLevel + LoadLeveAsync = freeze?
Hi, So right now we're loading the next level with loadLevelAsync when the level begins, so we with at the end of the level can switch level without loading the next level at the end. If we instead want to jump back to the main menu(which is in another scene) we then use the standard loadLevel.
But when having one level loaded with loadLevelAsync and then loading another one with loadLevel Unity completely freezes. I've tried to null the AsyncOperation to somehow unload the loaded level, since I can't find any other method for unloading what you've loaded, but this does not work either.
Anyone encountered this?
It makes sense that it would freeze up considering both operations would try to do stuff in the background. I'm curious what Application.CanStreamedLevelBeLoaded says before you try to load the menu? How about your AsyncOperation... is it finished when you try to do LoadLevel ?
It doesn't seem to me like LoadLevelAsync is very useful. You would probably be better off using LoadLevelAsyncAdditive. This way you can just destroy whatever's loaded. If that's not an option then your only choice is to make your LoadLevelAsync actually load that level before trying the LoadLevel operation.
Answer by Henrik Flink · Oct 01, 2014 at 12:34 AM
Application.CanStreamedLevelBeLoaded returns true for the menu and the AsyncOperation is finished when trying to use LoadLevel. I just find it strange that you can't unload or destroy the scene that's loaded in the background by LoadLevelAsync.
LoadLevelAsyncAdditive is an option for the future but would require some extra work to get working with our internal systems, so I was hoping that I could use the non additive option. I guess the only way is to poke the Unity guys about getting some kind of destroy function for scenes loaded async.
Thanks anyway.
I think I'm having a similar problem, did you find a solution to this?
Your answer
![](https://koobas.hobune.stream/wayback/20220613164057im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
LoadLevelAsync is acting like LoadLevel 5 Answers
Execute script when scene is visible to player 1 Answer
Application.LoadLevelAsync() causes Unity crash? 2 Answers
LoadLevelAsynq and LoadLevelAdditiveAsynq 1 Answer
Load new scene, controls freeze 0 Answers