Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Adding another locale caused build addressables groups to fail

Discussion in 'Localization Tools' started by ItsaGts, Dec 28, 2021.

  1. ItsaGts

    ItsaGts

    Joined:
    May 25, 2021
    Posts:
    7
    2020.3.25f1
    My project had 2 locales, en and zh-TW.
    It was working find.
    Then I added another locale via these steps
    1.Project Settings -> Localization -> Locale Generator -> add a new locale.
    2.Asset Management -> Localization Tables -> Edit Table Collection -> add the missing tables for the new locale
    3.Fill the translation
    Then building addressables groups always failed.

    The given key was not present in the dictionary.
    UnityEditor.GenericMenu:CatchMenu (object,string[],int) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:125)
    The given key was not present in the dictionary.
    UnityEditor.GenericMenu:CatchMenu (object,string[],int) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:125)
    Addressable content build failure (duration : 0:00:00)
    UnityEditor.GenericMenu:CatchMenu (object,string[],int) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:125)


    How to troubleshoot this?
    I think this is a bug because the locales I added before was okay. Should I fire a bug report?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
    Yes please file a bug report. Did you rebuild the addressables after you added the locale?
     
  3. ItsaGts

    ItsaGts

    Joined:
    May 25, 2021
    Posts:
    7
    Yes. I did Window -> Asset Management -> Groups -> Build -> New Build -> Default Build Script.
    And I always got the error messages in the first post.
    I couldn't reproduce it with a new project.
    So I am trimming my current project and will report the bug soon.
     
  4. ItsaGts

    ItsaGts

    Joined:
    May 25, 2021
    Posts:
    7
  5. ItsaGts

    ItsaGts

    Joined:
    May 25, 2021
    Posts:
    7
    Hi Karl, any update of the bug? I am also wondering if there's a workaround I can do while Unity team looking at the bug.
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
  7. ItsaGts

    ItsaGts

    Joined:
    May 25, 2021
    Posts:
    7
    I've got a mail from Unity team that it's a known issue.
    And it has been fixed in Addressables package 1.19.11.
    Thank you for the prompt reply.
     
    plmx and karl_jones like this.
  8. patrick508

    patrick508

    Joined:
    May 21, 2015
    Posts:
    40
    Sorry for bumping this topic, but Karl, do you perhaps have any idea if there is some kind of automated rebuilding of these addresables groups on the planning? Having to rebuild and do the extra manual step every time a new translation is added is kind of a pain...
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
    Yes in newer Unity versions there's a tick box in the addressable settings to do it. Sorry I'm not sure which version that is though and I'm not near to a machine to check.
     
  10. plmx

    plmx

    Joined:
    Sep 10, 2015
    Posts:
    308
    Thank you for this, I had the exact same issue - and using the analyzers did NOT fix it. However, upgrading to Addressables 1.20 worked perfectly, and now I can build again.
     
    karl_jones likes this.
  11. amenonegames

    amenonegames

    Joined:
    Nov 10, 2021
    Posts:
    19
    Hi !
    I had same problem in Unity 2022.3.4f and Addresable 1.21.18 on the Mac PC.
    I tryed Analyzers and Addressable update. But error is same occured.

    In my case, It solved throgh delete AddressableAssetsData folder and rebuild Addressables.
    But this means all addressable register including register names labels is broken.
    If you try it, be careful.
    I hope this helps people who is in this truble.
     
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
    Did you try running the Analyzers after the deletion? They should be able to repair the localization data.
     
  13. amenonegames

    amenonegames

    Joined:
    Nov 10, 2021
    Posts:
    19
    Yes, I try Analyze Rules in the addressable analyze window. But localization data was remain.

    Oh, my case is a little dirrent from this threads case perhaps.

    In my case Localization had uninstalled a little while ago.

    *Because Locale was broken every git pull. I reported it, But I could't continue develop this situation and could't wait fix or response it. And then report was closed.

    Now ,Back to the main topic, Addressable group was remains in Group window until today. It was gray out, could't delete.

    Then the first time from localization matter, I tryed build the game on Mac PC, caught the error.

    So, I tryed Analyze in the situation Localization already unintalled.

    Analyze was not working at least this situation.
     
  14. amenonegames

    amenonegames

    Joined:
    Nov 10, 2021
    Posts:
    19
    I tryed to checkout old branch. But Addressable Group is fixed already. In spite of role back to clearly the matter was occured branch.
    I reported this case in yesterday when problem is occured (but Analyze Rules is not still run).
    case No is IN-62057.
    I hope this report helps you.@karl_jones
     
    karl_jones likes this.