public static void SetI18NKey(this UITextmesh self, string key, params object[] paras) { if (string.IsNullOrEmpty(key)) { self.SetText(""); return; } self.__DisableI18Component(); self.__text_key = key; self.SetI18NText(paras); }
public static void SetI18NText(this UITextmesh self, params object[] paras) { if (string.IsNullOrEmpty(self.__text_key)) { Log.Error("there is not key "); } else { self.__DisableI18Component(); self.keyParams = paras; if (I18NComponent.Instance.I18NTryGetText(self.__text_key, out var text) && paras != null) { text = string.Format(text, paras); } self.unity_uitextmesh.text = text; } }
public static void SetText(this UITextmesh self, string text) { self.__DisableI18Component(); self.__text_key = null; self.unity_uitextmesh.text = text; }