Asset Bundle loading trap?

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!

  1. www.load(sharedCharacterAssets.bundle) // all character bundles are dependent on this
  2. www.load(characterTypeA.bundle), bundle.loadAsset(), bundle.unload(false)
  3. www.load(characterTypeB.bundle), bundle.loadAsset(), bundle.unload(false)
  4. sharedCharacterAssets.unload(false) // weapons don’t depend on this, get it out of RAM!
  5. 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)?

I ask because this is not a theoretical issue. The new asset bundle system automagically arranges dependencies between bundles without any way to direct or control the results. I’m seeing unpredictable results come out of it like: Character1.bundle and Character2.bundle have no dependencies, but Character3.bundle is dependent on Character2.bundle for whatever reason. That means I can’t just hard code “keep the Character’s shared asset bundle loaded” because I can’t predict which one that will be.

So, for Character1, I can load(bundle), loadAsset(), bundle.unload() no problem. But, if I do the same thing for Character2, am I going to screw up later loading Character3? What a mess…

I tried to reproduce it locally with a simple project, but failed. So could you please file a bug with reproducible project for it? Then we can take a look.