public static T New <T>(int id, string name, UIMainPanel panel, params object[] paras) where T : UISubPanel { GameObject g = panel.transform.Find(name).gameObject; T t = g.AddComponent <T>(); t.SetId(id); t.SetMainPanel(panel); t.Init(paras); t.hide(); return(t); }
public void SetMainPanel(UIMainPanel panel) { mainPanel = panel; }