Ejemplo n.º 1
0
 static void Postfix(ref TextMeshProUGUI ___advtext, ref TextMeshProUGUI ___nametext)
 {
     if (File.Exists(Font_patch_generic.path))
     {
         TMP_FontAsset font = Font_patch_generic.getFont();
         ___advtext.font  = font;
         ___nametext.font = font;
         //typeof(TMP_Settings).GetFields("m_defaultFontAsset", BindingFlags.NonPublic).SetValue(null, font);
     }
 }
Ejemplo n.º 2
0
 static void Postfix(ref object[] ___msgframe, ref GameObject ___uicanvas)
 {
     if (File.Exists(Font_patch_generic.path))
     {
         ___uicanvas.SetActive(true);
         TMP_FontAsset font = Font_patch_generic.getFont();
         for (int i = 0; i < ___msgframe.Length; i++)
         {
             //backlog text hidden inside private type -.- so directly changing font of textmeshpro components by GameObject.find
             var root      = GameObject.Find("logt" + i);
             var transform = root.transform;
             var msgtx     = transform.Find("text").GetComponent <TextMeshProUGUI>();
             msgtx.font = font;
             var nametx = transform.Find("namebg").gameObject.transform.Find("chname").GetComponent <TextMeshProUGUI>();
             nametx.font = font;
         }
         ___uicanvas.SetActive(false);
     }
 }