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

Bug Addressable Groups Labels and version control

Discussion in 'Addressables' started by MaartenB, May 12, 2022.

  1. MaartenB

    MaartenB

    Joined:
    Nov 6, 2014
    Posts:
    67
    Hi everyone,

    When you're using the labels for your Unity Addressables group, it seems that the label list changes are only local and not being synced with version control software like Git.

    Example: I have 10 objects. 5 objects with the label "Fruit" and 5 objects with the label "Vegetable". These labels are just newly created. If I commit this, nothing bad will happen to the user who's gonna pull this change.

    But, if I'm going to change the label name "Vegetable" to "Healthy Vegetable", which will be applied correctly in my addressable groups, and I'm going to commit & push this over the server, the label rename in the labels list will not be modified in the label list of the client that's pulling the changes. This results in having the objects with a "Vegetable" label not having a recognized label at all anymore.

    However, the label rename DOES occur in the objects themselves. (BuildSettings.asset)

    I guess this not syncing of the addressables' label list issue is not the intention here, so hereby my report.

    Here is some additional information on which versions I've used to recreate it:

    Unity version: 2020.3.34f1
    Addressables version: 1.20.0
     
  2. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    Hi @MaartenB! Hmm interesting, the labels list should be getting serialized to the AddressableAssetSettings .asset file. Does renaming the labels not modify that file?

    This could be a bug where we are missing an EditorUtility.SetDirty call on the file after the labels are renamed.
     
  3. MaartenB

    MaartenB

    Joined:
    Nov 6, 2014
    Posts:
    67
    Hey pillakirsten,

    Yeah. I think it's as simple as that indeed. And indeed, label renames do not appear in my uncommitted changes after renaming a label in the list.
     
  4. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    I see thanks for confirming! I'll create a bug ticket for this on our project board.

    In the meantime, I guess you could try to call SetDirty on the settings object yourself after renaming the labels.