Search Unity

Question Addressables bundle separate assets

Discussion in 'Addressables' started by denmla1001, Apr 29, 2023.

  1. denmla1001

    denmla1001

    Joined:
    Nov 29, 2021
    Posts:
    16
    Hi guys
    I have a project that is WebGL and it have Addressables system for loading differenr 3D models.
    I have a setup that will show only one model at a time and every model is ~50MB
    When I put them all in one group I got one bundle and when I call specific AssetReference it have to download whole bundle with all the models and that is not what I want.
    How do I solve this so that I have a bundle for every model?
     
  2. unity_shane

    unity_shane

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    106
    @denmla1001, Hi there, I recommend you take a look at the docs around groups to get a general feel for how the groups window works. One way you could accomplish what you're doing is separating each model and it's related assets into its own group. This will make sure that each model is bundled separately.

    You should take care to ensure that there are as few dependencies between models as possible however, as otherwise you may end up downloading multiple models automatically in order to resolve the dependencies between bundles. This is because when an assetbundle is loaded, all other asset bundles that it depends on must also be loaded. To get a better idea of the chain of dependencies associated with each bundle in your build, I recommend using the Addressables Report tool. I hope this helps!
     
  3. denmla1001

    denmla1001

    Joined:
    Nov 29, 2021
    Posts:
    16
    Tnx. I ended up using tags that pack separately but I may have to rethink that in the future.