I think I have some misunderstandings about Unity asset bundles.

First as I searched I found nothing that lets builds asset bundle just for one label. enter image description here

As you know, Ynity builds separate bundles for each of these labels. If it's not possible it means for every build, Unity overwrites previous bundles? Is it a good practice?

Another problem is, I need to automatically exclude asset-bundle assets from main project build. For example I have some asset bundles that designed some levels with them and before each level I check for those asset-bundles. Is there any way for automatic exclusion of those assets and automatically assigning them in start of each level?

  • \$\begingroup\$ I'm currently trying to work out how to use asset bundles myself. So far I think I've concluded that all scene dependencies of scenes that are included in your build, will always be included in the build itself. AFAIK there's no way to exclude assets used in scenes. So the only use-case for asset bundles I can see is unique content that you want to load in on top of your existing scenes. But this sounds crazy, so I'm not 100% on this. \$\endgroup\$ – Morten Andersen Oct 26 '19 at 13:33
  • \$\begingroup\$ @MortenAndersen thanks. i think i have to exclude them manually. but still dont know should i rebuild all of asset bundles everytime i want to make a new one \$\endgroup\$ – virtouso Oct 26 '19 at 13:39
  • \$\begingroup\$ I don't know the complete answer but I think you should use the overload of BuildPipeline.BuildAssetBundles() that takes a AssetBundleBuild[] as described here AssetBundleBuild \$\endgroup\$ – Morten Andersen Oct 26 '19 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.