public T SetPanelParent <T>(T panel, UIPanelhierarchy hierarchy) where T : UIPanelBase { if (null == panel) { return(null); } RectTransform transform = UIPanelController.UIHierarchy[(int)hierarchy] as RectTransform; panel.transform.ExSetParent(transform); panel.GetComponent <RectTransform>().sizeDelta = Vector2.zero; panel.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; return(panel); }
public UIPanelDataAttribute(string assetsName, UIPanelhierarchy hierarchy) { AssetsBundleName = assetsName; Hierarchy = hierarchy; }
//类型名 = assetsBundleName public UIPanelDataAttribute(Type type, UIPanelhierarchy hierarchy) { AssetsBundleName = type.Name; Hierarchy = hierarchy; }