The localization tool has been working great in the editor, but will not work in any of my builds.
My code test derived from the package sample:
public LocalizedString localizedText = new LocalizedString();
public Text text;
public void SetLocalizedString(string localizationTable, string localizationKey)
{
localizedText.TableReference = localizationTable;
localizedText.TableEntryReference = localizationKey;
var stringOperation = localizedText.GetLocalizedString();
if (stringOperation.IsDone && stringOperation.Status == AsyncOperationStatus.Succeeded)
text.text = stringOperation.Result;
}
I have completed all steps in this thread: Troubleshooting Addressables Issues and all tables are preloaded.
The LocalizeStringEvent component does work fine in editor and build.
I have done several builds now, trying different locale selectors, cleaning and rebuilding addressables, I have been at it for a while but still no solution. These errors I receive from the build log:
Exception encountered in operation CompletedOperation, status=Failed, result= : Exception of type âUnityEngine.AddressableAssets.InvalidKeyExceptionâ was thrown., Key=Locale, Type=UnityEngine.Localization.Locale
No Locale could be selected:
No Locales were available. Did you build the Addressables?
Exception encountered in operation UnityEngine.Localization.LoadTableOperation`2[UnityEngine.Localization.Tables.StringTable,UnityEngine.Localization.Tables.StringTableEntry], result=ââ, status=âFailedâ, status=Failed, result= : SelectedLocale is null
Unity 2020.3.5f1
Localization 0.11.0
Addressables 1.17.17
Thanks