In Unity 4.x we could define asset bundle dependencies with this method:
But it has been markes as obsolete and isn’t compatible with the new way of building asset bundles. I can’t find anywhere in the docs how we are supposed to define dependencies now?
The new AssetBundle building system in Unity 5 will detect dependencies automatically. Let’s say you have an ‘asset A’ which is both referenced by ‘asset B’ and ‘asset C’, Unity will detect that on its own and add the dependencies accordingly. All you have to do is just build all asset bundles and Unity will figure out the dependency graph.
That being said, it does not work in all cases. For example in the former system you could have and asset bundle containing ‘asset A’ AND ‘asset X’. With PushAssetDependencies, all bundles built thereafter could reference ‘asset A’. This will not work in the new system, if you want a bundle to serve as a dependency, it cannot contain multiple other assets (hope that makes sense).
So a bundle that can be used for other bundles to be dependent on needs to have one asset? That’s weird, it would mean that I can’t create an assetbundle with a texture set that others depend on? I would think that this is the whole idea of dependent asset bundles?