public static void SetUIShow(string TagID) { UI_Base ui = Instance.GetUIComponent <UI_Base>(TagID); if (ui == null) { return; } ui.OnOpen(); }
/// <summary> /// 添加UI /// </summary> /// <param name="ui"></param> public void AddUI(UI_Base ui) { if (UIs == null) { UIs = new List <UI_Base>(); } if (!IsContains(ui)) { UIs.Add(ui); } if (ui.IsShow) { ui.OnOpen(); } else { ui.OnClose();//默认关闭处理 } //ui.OnInitialize();//初始化 }