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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Incremental Building

Discussion in 'Addressables' started by TPetersonWay, Apr 11, 2020.

  1. TPetersonWay

    TPetersonWay

    Joined:
    Jun 27, 2019
    Posts:
    6
    Hey all,

    So as far as I can tell Incremental building is failing to happen. I've got a rather large project, with quite a few addressable groups. I've put most of our game scenes into addressable groups. Ran the analyze tool and separated out the shared things into their own groups.

    When I do a Build -> New Build -> Default Build Script. It always seems to take ~2 hours to build. I've also got a build script that calls "AddressableAssetSettings.BuildPlayerContent();" That too causes a wicked long build to happen.

    Am I doing something wrong? I thought the addressable system has incremental building. Any help would be appreciated

    Some more info on my setup:
    I'm using Unity 2019.2.18
    I'm using addressables version 1.7.5 with SBP version 1.5.10.
     
    shomz likes this.
  2. NuclearC00kie

    NuclearC00kie

    Joined:
    Apr 11, 2019
    Posts:
    32
    The SBP uses a build cache to keep cached results to improve incremental builds.
    You can find the build cache in your unity preferences (under Scriptable Build Pipeline). Make sure it has a good size (default is 200Gb).
    If the size is correctly set and you have a buildcache with some Gb of data inside, then incremental builds should be working fine.

    Out of curiosity, was your project faster to compile without Addressables?
    If you want to verify that incremental build is (not) working, try pruning your build cache and build again.
     
  3. TPetersonWay

    TPetersonWay

    Joined:
    Jun 27, 2019
    Posts:
    6
    @NuclearC00kie

    I've unfortunately tried that. Compiling was faster without Addressables. It'd only take 30 - 45 minutes to build our app with no addressables/assetbundles.

    Putting in Addressables, I understood that the first build should take awhile (I didn't expect a 2+ hr build time though). However, I thought every build after would take much less time. That doesn't seem to be the case. It seems if anything changes at all it seems to do a full rebuild of the bundles.

    I'm also not sure if the SBP BuildCache is even working. We have some build machines cranking out builds. I've set the max BuildCache size to different sizes (100GB currently) and eventually the cache exceeds that max and eventually all of the machines hard drive space. I've had to go in and manually hit the prune button every few days to stop it from killing our machines.

    Any help here would be appreciated.
     
    Last edited: Apr 14, 2020
  4. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    Where does it spend the majority of the time at? Compiling shader variants?
    If so, I'm in a similar situation and at this point I'm absolutely clueless on how to speed things up.
    It's especially annoying for testing multiplayer, so for each change you'd have to go through the whole build process, etc...
     
    IS_Twyker likes this.
  5. Thermos

    Thermos

    Joined:
    Feb 23, 2015
    Posts:
    148
    With that unbelievable size of cache (10G per build(even using cache and only change one file), default setting is up to 200G), we expected to build much faster than old pipeline. Seems like writing these cache files to disk actually takes a lot of time.
     
  6. NuclearC00kie

    NuclearC00kie

    Joined:
    Apr 11, 2019
    Posts:
    32
    I found that disabling "optimize mesh data" in the player settings really speeds up our (addressables) builds.
    of course it comes at the cost of having a bigger executable and more elements in RAM. but it's good to disable during development.