While loading asset bundles, it looks like it is possible to get into a state where it is impossible to proceed. Below is an example of what I mean. I realize that the example could be avoided by planning ahead of time and reordering the loads. I’m asking if it really is impossible to proceed if you do end up in this state.
I want to load Red Team Characters, Red Team Weapons, Blue Team Characters, Blue Team Weapons. The bundle loading sequence goes as follows:
Load the Red Team!
- www.load(sharedCharacterAssets.bundle) // all character bundles are dependent on this
- www.load(characterTypeA.bundle), bundle.loadAsset(), bundle.unload(false)
- www.load(characterTypeB.bundle), bundle.loadAsset(), bundle.unload(false)
- sharedCharacterAssets.unload(false) // weapons don’t depend on this, get it out of RAM!
- www.load(weapons.bundle), bundle.loadAsset(), bundle.unload(false)
Time to load the Blue Team!
6. www.load(sharedCharacterAssets.bundle) // FAIL? can’t load that again until we call sharedCharacterAssets.unload(true), right??
6 alternative 1: sharedCharacterAssets.unload(true), www.load(sharedCharacterAssets.bundle) // FAIL? does this unload some of the Red Team characters’ assets??
6 alternative 2: skip straight to www.load(characterTypeC.bundle) // FAIL? does this work after sharedCharacterAssets.unload(false)??
Do any of the step-6 alternatives actually work? Or, is it impossible to load the Blue Team (without accidentally unloading the Red Team) after sharedCharacterAssets.unload(false)?