コード例 #1
0
 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);
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
 public static void SetText(this UITextmesh self, string text)
 {
     self.__DisableI18Component();
     self.__text_key            = null;
     self.unity_uitextmesh.text = text;
 }