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

Bug Addressables 1.19.11 erasing AssetGroup custom build and load paths

Discussion in 'Addressables' started by beevik_, Jan 21, 2022.

  1. beevik_

    beevik_

    Joined:
    Sep 27, 2020
    Posts:
    88
    Addressables package v1.19.11 introduced a change that broke custom 'Content Packing & Loading' paths within an asset group.

    Every time you hit "Play" in the Editor, the addressables package now overwrites whatever custom load and build paths you had set up.

    I've isolated the bug to new code introduced in 1.19.11 within BundledAssetGroupSchema.cs:

    Code (CSharp):
    1. internal override void Validate()
    2. {
    3.     if (Group != null && Group.Settings != null)
    4.     {
    5.         List<string> variableNames = Group.Settings.profileSettings.GetVariableNames();
    6.         SetPathVariable(Group.Settings, ref m_BuildPath, AddressableAssetSettings.kLocalBuildPath, "LocalBuildPath", variableNames);
    7.         SetPathVariable(Group.Settings, ref m_LoadPath, AddressableAssetSettings.kLocalLoadPath, "LocalLoadPath", variableNames);
    8.     }
    9.  
    10.     // ...
    11. }
    This code is erasing custom load and build paths whether you want it to or not.

    Bug report submitted (case 1396642).
     
    Last edited: Jan 21, 2022
    sandolkakos likes this.
  2. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    266
    @beevik_ , thanks for creating the thread and submitting the bug report.
    I have exactly the same issue.

    Please let us know if your bug report gets a response. I'm gonna watch your thread to be a part of any updates.
     
  3. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey all, I just checked on the status of the ticket and it's in our QA queue. I do know there was an issue with upgrading to a specific version when we introduced Path Pairs, and this sounds very similar. I'll see if I can repro on my end and/or see what our internal QA say about the ticket when they get to it.
     
    sandolkakos and beevik_ like this.
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    I just wanted to report back. I was able to pretty easily reproduce the issue. I was hoping that it'd be a little more straightforward of a fix so I could be sure to get it into the next release, but I don't think I'll be able to make that happen. I did create a ticket with my findings so we should get it taken care of soon.

    As a workaround for the moment, if you can make a Profile Variable in the Profiles window and then set your paths using those variables it's should work without issue. In my quick test, doing that stopped my values from getting overwritten.

    Sorry for the inconvenience on this. I hope the workaround is tenable.
     
    sandolkakos likes this.
  5. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    sandolkakos and beevik_ like this.
  6. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    266
    I can confirm that the issue with Custom Paths is fixed on the version "1.19.19", thanks guys.
     
  7. yr_lee

    yr_lee

    Joined:
    Mar 9, 2021
    Posts:
    1
    I still see this issues on the version "1.19.19"
     
  8. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    266
    I don't have the custom paths getting erased anymore, but whenever I hit Play and I cannot trigger an Addressable build anymore. The build process always throws an error and gets stuck. I need to restart the Unity Editor and never hit Play on that session if I want to build the Addressables or the App as well.
    I don't remember the error right now, but I can come later and post it.
     
  9. unity_shane

    unity_shane

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    102
    @sandolkakos, Hey there, could you tell me a bit more about what you're encountering? Is it that you can't do an addressables build or that you can't do a player build without restarting? Or is it both? We're aware of an issue with player builds getting messed up if you try to do them immediately after entering playmode and frankly, it's a pretty pesky bug to track down and fix - if you're encountering that and have a project that consistently reproduces it, we'd really appreciate it if you could send a bug report our way. In either case though, I'm happy to help figure out what's going on and see if we can get a bug reported for it so that we can get it fixed. Thanks!
     
    sandolkakos likes this.
  10. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    266
    @unity_shane, thanks for paying attention to the issue I commented about.
    When I enter the play mode, on the same unity session it will fail to do both Addressables build and Player build.

    I'd like to create a sample project to submit, but at the moment I'm on travel and don't have access to my laptop. As soon as I am back home I will do that and create a bug report for it.
     
  11. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    266
    @unity_shane, after a long time I am back home where I can reproduce the issue on my computer and after a lot of tests, I can reproduce the error by following those steps:

    1. Create any AssetGroup and set its custom Load and Build paths like the image:
    upload_2022-8-11_20-53-22.png

    2. Build the Addressables and everything will work like a charm.

    3. Hit the play button and pay attention to the same AssetGroup, it loses the PathPreview:
    upload_2022-8-11_20-54-10.png

    4. Try to build the Addressables again and see those 3 issues (no stacktrace available):
    upload_2022-8-11_20-54-46.png

    Note: After restarting Unity the PreviewPaths are back and I can build the Addressables without any error until I do not hit the Play button.

    I hope those steps can help.
     
  12. vtihonyuk

    vtihonyuk

    Joined:
    Feb 28, 2022
    Posts:
    7
    Exactly same issue, Just reported a bug
     
    sandolkakos likes this.
  13. Tihonyuk

    Tihonyuk

    Joined:
    Dec 28, 2015
    Posts:
    8
    Experiencing exactly the same bug.
     
    sandolkakos likes this.
  14. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    266
    Hey @vtihonyuk , thanks for reporting the bug. Could you please share the link here once the issue tracker link gets created?