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)); }
/// <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); }