- Home /
How to unload after calling LoadLevelAdditive?
I call Application.LoadLevelAdditiveAsync to load multiple levels. But how do I unload the level when I am done?
The docs say you can do it - but not how!
Answer by Murcho · Jun 04, 2010 at 01:42 AM
Usually if you want the current level to unload when the new level has finished loading, you would use LoadLevelAsync instead, as it will unload the current level once the new one is finished loading. This allows you to bring up an animated loading screen or something similar.
If you're loading in multiple levels, you may have to LoadLevelAsync on the first one, and once it's complete, load all others with LoadLevelAdditiveAsync.
If you're trying to stream in and out levels, you will probably have to create a manager to destroy the objects manually once a level needs to be unloaded.
Your answer
Follow this Question
Related Questions
Switching scenes 1 Answer
(SOLVED)LoadLevel takes 3s in editor and 30s (!) after build. 0 Answers
Game crash on browser(html). 0 Answers