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

Build error in com.unity.addressables@1.50 when running build script or analyze

Discussion in 'Addressables' started by JoeriCG, Jan 17, 2020.

  1. JoeriCG

    JoeriCG

    Joined:
    Apr 25, 2018
    Posts:
    17
    Another addition to my quest to bring the addressables system to its knees. In the previous thread I got an argument exception because an asset bundle hash was a duplicate. I had a ton of assets that were de-duplicated using the analyze rule, of which I also simplified the address name, but this resulted in a lot of duplicate asset addresses which the build script apparently doesn't like. So I figure I (a) remove the group of de-duplicated assets and (b) run the analyze tool again, this time leaving the paths as address names so they remain unique.

    However after step (a), I get this error when attempting step (b):

    upload_2020-1-17_15-17-43.png

    I've tried deleting the PackageCache and ScriptAssemblies folder in the Library folder but the issue persists. If I roll back with the versioning system I'm back at the error in the other thread.

    Unity 2018.4.8, addressables 1.5.0.

    It would be nice if I could get some input from Unity devs at this point.
     
  2. JoeriCG

    JoeriCG

    Joined:
    Apr 25, 2018
    Posts:
    17
    After some more poking: it seems related to running Unity on the Nintendo Switch platform. I don't get the error when I switch back to PC Standalone.
     
  3. JoeriCG

    JoeriCG

    Joined:
    Apr 25, 2018
    Posts:
    17
    Bumping this, yet again. So to summarize: the error seems to be specific to running the build script on the Nintendo Switch platform. From what I can peek from the source code, the CacheInitialization.Initialize calls are excluded on UNITY_SWITCH and UNITY_PS4 platforms so those Caching calls I get errors from should be wrapped in the same #if directives.

    EDIT: seems this error was tackled in 1.5.1? I only just noticed the update.
     
    Last edited: Jan 20, 2020
  4. JoeriCG

    JoeriCG

    Joined:
    Apr 25, 2018
    Posts:
    17
    So I wrapped calls in ClearDependencyCacheForKey with #if !UNITY_SWITCH & !UNITY_PS4 and my build was progressing further.

    Then everything ground to a halt and I got hit with this error:
    upload_2020-1-20_16-31-28.png
    upload_2020-1-20_16-28-5.png

    EDIT: above error this happens in 1.5.1. It's not in the addressable package specifically, but the scriptable build pipeline.
     
    Last edited: Jan 20, 2020
  5. JoeriCG

    JoeriCG

    Joined:
    Apr 25, 2018
    Posts:
    17
    After adding some debug logs inside the SBP package, I tracked down the asset causing this and it turned out Unity's importer had failed for some reason (it was a simple png image). Reimporting the asset fixed it.

    It's be nice if these packages were a bit more robust and could catch these cases and properly communicate the cause to the user.
     
  6. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
    Hey @JoeriCG, sorry to hear about the issues you had! I've sent this post over just so the team can have a look for you :)