I had a previous discussion in regards to Unloading asset bundles after downloading them. In the reply Lucas had mentioned that it is always a good idea to unload the bundles to free up memory. However, I am a bit confused when it comes to scenes that reside in asset bundles. For instance, see the below code snippet. If I unload the asset bundle after loading the scene, I assume that the asset bundle will be removed from memory and the scene is still in memory. However, this is not the cause. Unloading the asset bundle seems to be unloading the entire scenes contents. Based on the documentation for Unload, passing a value of false to it indicates that this behavior should not be occuring??? Am I missing something here?
asked Apr 20 '10 at 09:40 PM
The issue is that Application.LoadLevelAdditive is delayed until the next frame. Thus you are actually unloading before the level has been loaded.
You can add a yield between LoadLevelAdditive and Unload, then it should work. Better use LoadLevelAdditiveAsync and yield the result.
answered Sep 26 '10 at 06:01 PM
Report a bug with a small sample.
While loadleveladditive does not technically load the scene as a scene but add it into the current one, instantiated stuff should be kept alive too and does so if you instantiate it directly or if you used loadlevel there
answered Aug 15 '10 at 12:09 AM