void DrawNode() { scriptViewRect = new Rect(nodeViewContianer.contentRect.x, nodeViewContianer.contentRect.y - menuBarHeight + 2, nodeViewContianer.contentRect.width / zoomScale, nodeViewContianer.contentRect.height / zoomScale); EditorZoomArea.NoGroupBegin(zoomScale, scriptViewRect); DrawGrid(); foreach (var item in viewStateList.ToArray()) { if (!string.IsNullOrEmpty(item.viewState.name)) { //Draw Bounds calculateCache.Clear(); calculateCache.Add(item.drawRect); if (viewPageList.Count(m => m.viewPage.viewState == item.viewState.name) > 0) { calculateCache.AddRange(viewPageList.Where(m => m.viewPage.viewState == item.viewState.name).Select(m => m.drawRect)); Rect rect = VS_EditorUtility.CalculateBoundsRectFromRects(calculateCache, new Vector2(20, 20)); GUI.Box(rect, "", new GUIStyle("SelectionRect")); } } item.Draw(false); } foreach (var item in viewPageList.ToArray()) { bool highlight = false; if (Application.isPlaying && ViewController.Instance != null) { if (item.viewPage.viewPageType == ViewPage.ViewPageType.FullPage) { highlight = ViewController.Instance.currentViewPage.name == item.name; } else { highlight = ViewController.Instance.IsOverPageLive(item.name); } } else { highlight = !string.IsNullOrEmpty(search) && item.name.ToLower().Contains(search.ToLower()); } item.Draw(highlight); } DrawCurrentConnectionLine(Event.current); EditorZoomArea.NoGroupEnd(); DrawFloatWindow(); ProcessEvents(Event.current); CheckRepaint(); }