I’m pulling my hair out. Cannot figure out why Unity cannot load Locales.
I have Unity 2020.2.4f1 and Localization 0.10 preview installed. Followed quickstart from Quick Start Guide | Localization | 0.10.0-preview and created string table. For now, it have only en-locale. Also took PreloadingScreen sample from Localization. Still, Locales will be null all the time.
In Project Settings, Available Locales has English(en). Also, this is in Spesific Locale Selector.
Addressables have been built, then Google → Build and run to run on Android.
2021/02/17 23:17:38.185 22524 22567 Error Unity No Locale could be selected:
2021/02/17 23:17:38.185 22524 22567 Error Unity No Locales were available. Did you build the Addressables?
2021/02/17 23:17:38.185 22524 22567 Error Unity The following (3) IStartupLocaleSelectors were used:
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.CommandLineLocaleSelector
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.SystemLocaleSelector
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.SpecificLocaleSelector
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.LocalizationSettings:SelectLocale()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.LocalizationSettings:GetSelectedLocale()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.PreloadDatabaseOperation`2:BeginPreloading()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeExecute()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Start(ResourceManager, AsyncOperationHandle, DelegateList`1)
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.ResourceManagement.ResourceManager:StartOperation(AsyncOperationBase`1, AsyncOperationHandle)
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.Settings.LocalizedDatabase`2:get_PreloadOperation()
2021/02/17 23:17:38.185 22524 22567 Error Unity UnityEngine.Localization.InitializationOperation:PreLoadTables()
2021/02/17 23:17:38.185 22524 22567 Error Unity System.Action`1:Invoke(T)
2021/02/17 23:17:38.185 22524 22567 Error Unity Deleg
2021/02/17 23:17:38.186 22524 22567 Error Unity Can not preload when `LocalizationSettings.SelectedLocale` is null.
And then LocalizationSettings.InitializationOperation.PercentComplete will be 0.2f forever.
Package Manager shows Addressable 1.16.13, there is newer 1.16.16. Tried updating, after that I cannot build Addressables anymore, Addressables Groups is totally empty.
Names are with Append and hash. Addressables build clean and then build again. Struggling days for now, different Unity versions, different localization versions. It’s sometimes working in player but not in device. Cannot spend anymore time on this, have to be productive.
So the Addressables team believe that this error is caused by building the Addressables for the wrong platform.
When you do the Build make sure that the Editor is set to the target platform in the Build Settings window.
Yes well, it is Android. Build Settings is Android, I can build and run from that window. Also, top menu has Google menu where you can run it too. Still result is same, Locales not found and no localization.
Good morning Karl!
I did what you said:
1.Unity version 2019.4.20f1
2.Localization package version 0.10.0
3. Version of the Addressables package 1.16.16
4. Disabling code stripping does not affect the result
5. Cleaning and building Addressables does not affect the result
6. Changing Bundle Naming does not affect the result
The fact is that when building Addressables and building the application, there are no errors. The error occurs in an already built application. Feeling like unityInstance just doesn’t see the built Addressables.
If it helps, below is a link to a simple project where you can reproduce the error if you build the application. Everything works in the editor, there is localization. https://drive.google.com/file/d/19qxbMwwHaQNL5xgUiTp9fDAUgwI39Xts/view?usp=sharing