I have several areas in my game project that are split over several scenes, for instance let's say there is a first area called "Basement" which is split in the Basement_1, Basement_2 and Basement_3 scenes; and another area, "Attic", split over Attic_1 and Attic_2.
Some assets (textures atlas and sounds) are shared across all the scenes of an area and so I thought that I could make an AssetBundle with all the shared assets for "Basement", and another AssetBundle with the shared assets for the "Attic" area. Then when my player is about to enter the "Basement" area, I'd load the "Basement" AssetBundle, so that when I call Application.LoadLevel("Basement_1"), Application.LoadLevel("Basement_2") or Application.LoadLevel("Basement_3"), the shared assets (which have been loaded in the bundle) aren't unnecessarily reloaded, only the scene-specific assets would be loaded. Then if I get to a point where the game knows the Basement assets will no longer be necessary, or not for a long time at least, then I'd unload the bundle, to free up memory, and load whatever other bundle may be relevant (the Attic one for instance).
My question is: is this how it works? As in, say I'm about to enter "Basement", so if I load my "Basement" AssetBundle from disk, and basically just call LoadAllAssets() on it, will Application.LoadLevel("Basement_1") "automatically" look for assets in the bundle that I've loaded? or will Application.LoadLevel just reload the assets it needs anew?
My current understanding is that Application.LoadLevel will not automatically look in the AssetBundle. If so, is there a way to make it look in the loaded AssetBundle(s) ? Is there another way that I'm not seeing?
The idea is to try to reduce loading times, because for instance going in and out of a door could trigger a call to Application.LoadLevel("Basement_X") and Application.LoadLevel("Basement_Y") back and forth.
Thanks in advance for any insights ;)
Cheers!