Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Selecting which assets to rebuild when building Addressable bundles

Discussion in 'Addressables' started by shomz, Feb 27, 2020.

  1. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    Is there a plan to add this option to Addressables?

    Example use-case scenario: having multiple scenes as addressables, you modify some of them, go to update the existing build, and it still rebuilds all the scenes, even the ones that haven't been touched.

    It would be a time saver not having to rebuild the full system just for a single change, but only updating the catalog and the changed assets - either automatic or manual would be helpful.
     
    andreiagmu likes this.
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,796
    Appreciate the suggestion! I'll flag this for the team!
     
  3. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    Great, thank you!
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey @shomz just curious, are these scenes all in the same Addressable Group and the group set to Pack Together on the BundledAssetGroupSchema? If this is the case then we probably won't be able to support something like this given how scene interdependencies work with AssetBundles.

    Otherwise we should already be doing an incremental build with the Scriptable Build Pipeline. Can you provide a little more context? Like what your Addressables setup looks like, what you modifying in a scene, what is all being rebuilt (just scenes or other things?).
     
  5. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    Hey @DavidUnity3d,

    thank you for replying.

    The scenes are in the same Addressable Group, but are set to be Packed Separately, which I believe is the correct way to do it.

    Basically, I have the core of the app and then each level is a separate Addressable Asset (the core and the levels are in different groups). The idea is to be able to update levels without having to touch anything in the core scene, and so far that works just great until it gets to building. I'd like to be able just to overwrite the bundle files and the catalog on the server and just have seamless updates like that. Levels themselves share almost nothing (basically, they contain only layouts, with the main stuff being instantiated by the core scene when and where needed), so updating one level should have no impact on the others whatsoever.

    All scene modifications are merely cosmetical - like changing textures (unique to the scene), slightly shifting objects' positions, etc.

    However, when I use Update a Previous Build, I can see Unity opening one scene after the other and probably packing them. It takes about the same time as if I'd to a clean build from scratch.
    I'm pretty sure it would take the same long time to update the previous build without having changed anything in the scenes.
    The group with scenes is marked static (or "content updates are allowed", as it is now called), they use caching, and I've recently changed the file name to consist only of the bundle names (no hashes) in order to avoid having duplicate bundles in the ServerData dir, and hopefully speed up the performance (but this remained the same).
     
  6. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hm.. Ok that sounds like you're doing the right stuff to me. Have you or can you submit a bug with Unity?
     
  7. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    No, I have not, because I wasn't sure if this was the intended behaviour (I'm fairly new to Addressables).

    I forgot to mention something that you might find useful: I believe the majority of build time is spent on compiling shaders even though none of the scenes have been touched. SpeedTree added thousands of shader variations and I wasn't able to find a way to avoid compiling them on every build. So maybe the problem is with Addressables + shader compilation?

    Anyway, if I may suggest - for building Addressable bundles it would be nice to have a GUI window showing all the assets/scenes that Unity finds dirty with optional toggles we could use to skip building an asset or to force rebuilding. That would give us a bit more insight into what's going on.
     
    robrab2000-aa likes this.
  8. AlexandreDelan

    AlexandreDelan

    Joined:
    Oct 4, 2016
    Posts:
    16
    Hello showz,

    I have the same issue here. Do you have found any solution or workaround.

    Thanks

    NB:
    same goal:
    - a core level that stay in the build
    - level in independant group

    Last thing I've done is to move some gun skins from resource to a addressable group. While doing a update existing build, everything has been rebuild (I have new bundle for everything).

    As a note, there is no link to these skins to the level.
    As a additional note, these texture was previously on a atlas.
     
    Last edited: May 4, 2020
  9. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    Hi Alex,

    no solutions whatsoever, it's still as broken and random as it was.

    For now, I'm using a local profile that only has the core scene and one additional level, and that's all... I expect it to rebuild everything once I decide to build the whole thing, sadly.
     
  10. PascalZieglerAzuryLiving

    PascalZieglerAzuryLiving

    Joined:
    Aug 3, 2020
    Posts:
    11
    Hey David,

    For me, the "incremental" build provess works fine. The problem is, that I don't want to checkout all my bundles (that are a loooooot of GBs) in my automated build pipeline when only one bundle changed. But if I only download the ones that I want to build and not the unchanged ones, the missing ones will not appear in the remote catalogue json file and thus will be missing in the application.

    Summed up: What I need is a possibility to update a catalogue json for a specific group without touching the other (missing) ones. Would that be possible?

    Thank you for your good work so far!