Search Unity

Option to only build parts of addressables

Discussion in 'Addressables' started by jmilsonneau, Aug 30, 2019.

  1. jmilsonneau

    jmilsonneau

    Joined:
    Apr 24, 2019
    Posts:
    6
    Hi,

    Is there a way or plans to add more control over addressables build, as far as I can tell we can only build all groups currently but I think it would be useful to be able to only build a group. For example if we pack levels in a group we could only build one group and reduce our build time.
     
    saarg likes this.
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    268
    Nice feature to have, or incremental build in general.
     
  3. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    913
    we sorta have that, but may not quite what you want.

    Each bundled group has an "include in build" checkbox. With that off, we won't build that group. This is intended for quick iteration when working on a small portion of the game. If that's your situation, great. If you were hoping this feature would allow you to build some stuff, then later build others, and it all work together, that won't be the case without some hoop jumping. You'd have to save and load all your catalogs from each build. And you'd have to be very careful about the bundle layout.
     
  4. jmilsonneau

    jmilsonneau

    Joined:
    Apr 24, 2019
    Posts:
    6
    The include in build checkbox would work when we want to work on a subset of the world and don't want to build other scenes that`s cool but what if we have a bundle for localized strings that we want in remote on a server, can we use this to build only this bundle and deploy it to the server? I'm guessing we'd have to disable Crc and name the bundle without a hash right?
     
  5. dzamani

    dzamani

    Joined:
    Feb 25, 2014
    Posts:
    89
    Hi!

    I have a few questions about this:
    - If you can detect some of the dynamic asset groups are changed but not the others, is it not possible to rebuild only those groups ? (all of them are dynamic).
    - If I set a group static and then press the build content button, that group will be built so for fast iterations on consoles, how do you expect us to reduce the build content time when you cannot rely on the "include in build" checkbox because you need all of the content ?

    That's basically our usecase where we are working on console, change a small part of the content and it feels like it's rebuilding everything everytime, in theory it should be able to make incremental updates to the content no ?

    Thanks!
     
  6. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    268
    That's why the fast mode is introduced at the first place. However as said, incremental build is a nice feature to have. And seems quite possible, by parsing the generated .bin file to detect which groups are *dirty*.
     
  7. dzamani

    dzamani

    Joined:
    Feb 25, 2014
    Posts:
    89
    Fast mode is useful only in editor, my usecase is about console builds which cannot benefit from this feature.
     
    jmilsonneau likes this.
  8. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    913
    Two things.

    1. addressables bundle builds (which use scriptablebuildpipeline package) already has a very extensive incremental build system. You can even connect it to a cache server to get the benefits across multiple machines. https://docs.unity3d.com/Packages/c...xamples.html#cache-server-integration-example Even without the cache server though, builds with only small changes will only rebuild what had the small change. Those builds should be much quicker.

    2. back to the original topic of unchecking some groups. The thing to note if you're trying to do this during a real build is that you have to correct for other missing data. For one, we create the catalog during the build. So partial builds will only have a partial catalog, that you then have to deal with. Second, dependency inclusion may not be totally correct. Such as common shaders between the checked and unchecked groups. This part can get fairly complicated.
     
    dzamani likes this.
  9. dzamani

    dzamani

    Joined:
    Feb 25, 2014
    Posts:
    89
    I see so from what I understand, I should use 2 caches servers (one for assets and one for build artifacts).
    The main issue that I'm seeing right now is that I would need to inherit from BuildScriptPackedMode and override the DoBuild method in order to add the cache server, will we have something better than that in the next updates ?

    Thanks!
     
  10. jmilsonneau

    jmilsonneau

    Joined:
    Apr 24, 2019
    Posts:
    6
    I didn't know about the cache server for the build system, that should solve some of my concerns, thanks