public void OnCanvasTreeGUI(Rect rect) { if (root == null) { return; } Event e = Event.current; if (!rect.Contains(Event.current.mousePosition)) { GUINodeSelection.dragNode = null; } root.CalcHeight(); var rs = rect.HorizontalSplit(root.Height); scroll = GUI.BeginScrollView(rect, scroll, rs[0]); root.OnCanvasTreeGUI(rs[0], e); GUI.EndScrollView(); if (HandleEve) { EmptyEve(e, rs[1]); } }