Ejemplo n.º 1
0
        public static void SetText(this NK_TextMeshProUGUI text, string localizeKey, string value)
        {
            if (!LocalizationManager.instance.ContainsKey(localizeKey))
            {
                LocalizationManager.instance.textTable.Add(localizeKey, value);
            }

            text.localizeKey = localizeKey;
            text.LocalizeTextAsync();
        }
Ejemplo n.º 2
0
        public static void SetText(this NK_TextMeshProUGUI text, string localizeKey, string value)
        {
            var localMgr = Game.instance.GetLocalizationManager();

            if (!localMgr.ContainsKey(localizeKey))
            {
                localMgr.textTable.Add(localizeKey, value);
            }


            text.localizeKey = localizeKey;
            //text.LocalizeTextAsync();    // broken in update 27.0. Not sure what to do to fix it
        }
Ejemplo n.º 3
0
 public static string GetText(this NK_TextMeshProUGUI text) => LocalizationManager.instance.textTable[text.localizeKey];