Hi,
I’m stuck with that bug since 2 hours now. I can’t understand where it come form. I build for android.
What I did :
Installed the 0.9 preview from GIT
Created my locales
Created my string table
Build my addressable from group > build > new build > default build script
The normal procedure that I’ve done several times and worked each time.
Everything works into the editor. But when I launch the app on android device, my localeSelected var is not assigned and something goes wrong with AvailableLocales.Locales.Count because this value is never assigned too.
localeSelected var is assigned by this script :
public void FindLocale(){
for(int i = 0; i < UnityEngine.Localization.Settings.LocalizationSettings.AvailableLocales.Locales.Count; i++)
{
var locale = UnityEngine.Localization.Settings.LocalizationSettings.AvailableLocales.Locales[i];
if (UnityEngine.Localization.Settings.LocalizationSettings.SelectedLocale == locale){
localeSelected = i;
}
}
}
I call this function when a transition is done (3s after launching the app) I tried to delay it to 20s but nothing changes, so it is why i am stuck. I also tried resetting packages to default but doesn’t help too.
I just google the Peoload Operation error and saw this thread :
As you said, it seems to be a bug in the package not still solved at the moment, am i right ?
If yes, do you have an idea on how to avoid this error ? I just need the locale used by the System locale Selector to load different files from the Resources asset folder once in the game.
No that error is due to stripping, if you have stripping disabled then it’s not that.
It sounds like you are trying to access the locales before they have loaded, you need to wait for the preloading operation to complete. Take a look at the samples we have, the locale selector menu should give you an idea.