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

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:
    7,876
    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:
    7,876
  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:
    7,876
    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.