Asset Bundle Dependencies

I’m having an issue with loading asset bundle dependencies with Unity 5’s new system. Here’s the problem: I’m loading Asset Bundle A which has Asset Bundle B as a dependency, when I load A the assets that it shares with B are not loaded, fine… so I make sure I always load B first. Even if I do this the assets from B are not present (MissingReferenceException) when I load A. The asset in question is a prefab referenced in A, that is built into B. Hopefully that is not too hard to follow. In the manifest it does properly say that A has B as a dependency.

Some things to note: I’m not tagging things in the editor, I’m creating an AssetBundleBuild[ ] in code, gathering the paths for all the bundles and passing it in to BuildPipeline.BuildAssetBundles using only the BuildAssetBundleOptions.UncompressedAssetBundle option.

I’m also renaming/moving the asset bundles after they’re built. I do this so that file structure/casing matches the file structure we have for the assets in the project, since Unity lower cases/dumps everything into one folder. Doing this makes it much easier to load things differently (LoadAssetAtPath in the Editor for instance), as everything has the same path, just a different root. We don’t always want to have to rebuild asset bundles and load from them.

Could either of those things be breaking things, so Unity forgets how these 2 bundles should be connected?

As for code, I’m simple using AssetBundle.CreateFromFile to load the asset bundles and AssetBundle.LoadAsset or AssetBundle.LoadAllAssets to load assets.

Any help appreciated, thanks!

I have ruled out renaming/moving causing an issue. I tried without doing this and I’m still running into the issue. Just to reiterate the issue is that a prefab in A has a script that references a prefab in B. When I load A (whether or not I’ve loaded B), the reference in the script for the prefab is “Missing”.
Am I required to use WWW.LoadFromCacheOrDownload (passing in the hash of the asset bundle)?

Found the problem. I was accidentally calling Unload(false) on the dependent asset bundle, which of course broke things.