예제 #1
0
        public override void OnGUIUpdate()
        {
            float offsetX = 0;
            float offsetY = 0;

            if (_IsAddBox)
            {
                if (_Box == null)
                {
                    _Box = HS_Box.Create("DefaultAreaBox");
                }
                offsetX = 5;
                offsetY = 5;
                _Box.SetSize(W, H);
                _Box.OnGUIUpdate();
            }
            GUILayout.BeginArea(new Rect(offsetX, offsetY, W, H));
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="name"></param>
        /// <param name="boxName">默认为 ""</param>
        /// <returns></returns>
        public static HS_Box Create(string name, string boxName = "")
        {
            HS_Box box = new HS_Box(name, boxName);

            return(box);
        }