/// <summary> /// 初始化函数 /// </summary> /// <param name="fake">数据模型</param> /// <param name="element">UI主体元素</param> public override void Initial(FakeStruct fake, UIElement element, UIInitializer initializer) { contents.Clear(); base.Initial(fake, element, initializer); Auxiliary = HGUIManager.FindChild(fake, "Auxiliary"); Drag = element.Find("Drag"); Drag.activeSelf = false; MainContent = new DesignedDockAuxiliary(this); MainContent.Initial(MainArea, element.Find("Auxiliary")); contents.Add(MainContent); MainContent.SetParent(MainArea); }
public override void Initial(FakeStruct fake, UIElement element) { contents.Clear(); base.Initial(fake, element); Auxiliary = HGUIManager.FindChild(fake, "Auxiliary"); var trans = element.transform; Drag = trans.Find("Drag").GetComponent <UIElement>(); Drag.gameObject.SetActive(false); MainContent = new DesignedDockAuxiliary(this); MainContent.Initial(MainArea, trans.Find("Auxiliary").GetComponent <UIElement>()); contents.Add(MainContent); MainContent.SetParent(MainArea); }