void DefetchTexts() { if (Texts == null) { return; } if (SelfBaseGlobal == null) { return; } foreach (var item in Texts) { if (item != null) { GlobalUITextMgr.RemoveText(item); } } }
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); } } }