Example #1
0
 void DefetchTexts()
 {
     if (Texts == null)
     {
         return;
     }
     if (SelfBaseGlobal == null)
     {
         return;
     }
     foreach (var item in Texts)
     {
         if (item != null)
         {
             GlobalUITextMgr.RemoveText(item);
         }
     }
 }
Example #2
0
        void FetchTexts()
        {
            Texts = GO.GetComponentsInChildren <UnityEngine.UI.Text>(true);
            Font newFont = UIConfig.GetFont(FontType);

            if (newFont == null)
            {
                return;
            }
            if (Texts == null)
            {
                return;
            }
            if (SelfBaseGlobal == null)
            {
                return;
            }

            foreach (var item in Texts)
            {
                if (item != null)
                {
                    if (UIConfig.EnableSharpText)
                    {
                        item.material = GRMgr.FontRendering;
                    }
                    item.resizeTextForBestFit = false;
                }
            }


            foreach (var item in Texts)
            {
                if (item != null)
                {
                    GlobalUITextMgr.AddText(item, FontType);
                }
            }
        }