Beispiel #1
0
        /// <summary>
        /// 设置窗口的自定义区域视图
        /// </summary>
        /// <param name="view">要绑定的子视图</param>
        /// <returns></returns>
        public RectTransform SetView(RectTransform view)
        {
            RectTransform oldView = GetView();

            view.SetParent(UIWindowClientArea.transform);
            UIAnchorPosUtils.SetUIPos(view, 0, 0, 0, 0);

            if (oldView != null)
            {
                oldView.gameObject.SetActive(false);
                UIManager.SetViewToTemporarily(oldView);
            }
            return(oldView);
        }