public UIWindowBase CreateUIWindow <T>(string UIName) { UIWindowBase UIbase = null; try { int assetid = UIManager.UI_Table.GetRowByUIType(UIName).assetid; GameObject UItmp = GameObjectUtility.CreateGameObject(assetid, m_UIManagerGo); UIbase = UItmp.GetComponent <UIWindowBase>(); UIbase.OnInitUI(GetUIID(UIName)); m_UILayerManagerCom.SetLayer(UIbase);//设置层级 AddUI(UIbase); } catch (Exception e) { DebugHandler.LogError("OnInit Exception: " + e.ToString()); } return(UIbase); }