/// <summary> /// 添加可停靠区域 /// </summary> /// <param name="dock">区域停靠方位</param> /// <param name="r">占用大小</param> /// <returns></returns> public DesignedDockAuxiliary AddArea(DockpanelArea.Dock dock, float r = 0.5f) { var area = dockArea.AddAreaR(dock, r); var go = HGUIManager.Clone(layout.Auxiliary); go.SetParent(area.model); go.localScale = Vector3.one; go.localRotation = Quaternion.identity; var con = new DesignedDockAuxiliary(layout); con.Initial(area, go); layout.contents.Add(con); return(con); }
/// <summary> /// 添加可停靠区域 /// </summary> /// <param name="dock">区域停靠方位</param> /// <param name="r">占用大小</param> /// <returns></returns> public DesignedDockAuxiliary AddArea(DockpanelArea.Dock dock, float r = 0.5f) { var area = dockArea.AddAreaR(dock, r); var go = HGUIManager.GameBuffer.Clone(layout.Auxiliary); var trans = go.transform; trans.SetParent(area.model.transform); trans.localScale = Vector3.one; trans.localRotation = Quaternion.identity; var au = go.GetComponent <UIElement>(); var con = new DesignedDockAuxiliary(layout); con.Initial(area, au); layout.contents.Add(con); return(con); }