if (Localization.instance != null)//It passes this if.. then it's not Localization.instance
{
mList.items.Clear();
for (int i = 0, imax = Localization.instance.languages.Length; i < imax; ++i)
{
TextAsset asset = Localization.instance.languages[i];
if (asset != null) mList.items.Add(asset.name);
}
mList.selection = Localization.instance.currentLanguage;
}
It breaks on the for... But only when I return to the scene. Not sure why. The only thing I notice it's that the first time I run it the _Localize object doesn't appear, but when I return to the main scene it is there along with the prefab Localize.
While I am asking two things:
1 - Is Ngui ready for Chinese language and similar ones? I mean.. I just have to include the font?
2 - (Not really a question I guess) If the Localize key is changed during game-play it doesn't update the labels right? I made a function to address this.. Just asking if it's normal.