Search Unity

Bug (Case 1365170) AddressableProfileSettings.GetValueByName() no longer returns value in 1.19.4

Discussion in 'Addressables' started by Peter77, Sep 13, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    The method
    AddressableProfileSettings.GetValueByName()
    no longer returns the value in Addressables 1.19.4. This used to work in 1.18.15 and earlier versions.



    Reproduce
    1. Open attached project
    2. Update Addressables to 1.19.4
    3. Click from main menu "BugReport > Print paths"

    Actual
    The Debug.Log's show the empty paths.

    Expected
    The Debug.Log's show the paths of the Profile Settings found under "Window > Asset Management > Addressables > Profiles".
     

    Attached Files:

  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
  3. andymilsom

    andymilsom

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    294
    Thanks Peter for the great bug report.
    I had a look at this and its a tricky situation.

    The setup string for the AddressableAssetSettings.kLocalLoadPath name was changed, from LocalLoadPath to Local.LoadPath. When adding paired build/load groupings. Though changing this was not ideal, it does also mean undo'ing it is also not ideal.

    There will be two ways to adjust for this. 1, change your variables, creating a "Build and Load Path" variables for Local and Remote, with prefix name being Local or Remote and set your old Groups to use that. 2, instead of using kLocalLoadPath use "LocalLoadPath" instead.
     
  4. kjyv

    kjyv

    Joined:
    Feb 20, 2018
    Posts:
    53
    Thanks for your comment @andymilsom, I'm not sure I understand you suggested way #2 (there is only
    AddressableAssetSettings.kLocalLoadPath which as you said was changed to "Local.LoadPath"). Solution #1 worked for us though by changing the now outdated entries in AddressableAssetSettings.asset (not sure how else your are suggesting to create variables)
     
  5. andymilsom

    andymilsom

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    294
    Thats great you got a solution, sorry for the inconvenience on this.

    > not sure how else your are suggesting to create variables
    You can create paired build/load paths, or individual variables. Though if you have existing variables just renaming them with the "." after local probably makes most sense.
     
    kjyv likes this.