public override void RenderNode(Vector2 aFrom) { if (BoxStyle == null) { BoxStyle = new GUIStyle(); BoxStyle.padding = new RectOffset(8, 8, 8, 8); BoxStyle.overflow = new RectOffset(-2, -2, -2, -2); } BoxStyle.normal.background = BoxTexture; GUI.Box(new Rect(aFrom - ChildNodeOffset / 2, GetRenderSize() + ChildNodeOffset), GUIContent.none, BoxStyle); base.RenderNode(new Vector2(GetRenderSize().x / 2 - NodeSize.x / 2, 0) + aFrom); //UnityEditor.EditorGUI.DrawRect(new Rect(aFrom, NodeSize), Color.gray); float CoordXAdd = 0; foreach (BTNode ChildNode in ChildNodes) { ChildNode.RenderNode(aFrom + new Vector2(CoordXAdd, NodeSize.y + ChildNodeOffset.y)); CoordXAdd += ChildNode.GetRenderSize().x + ChildNodeOffset.x; } }