/// <summary> Show right-click context menu for hovered reroute </summary> void ShowRerouteContextMenu(RerouteReference reroute) { var contextMenu = new GenericMenu(); contextMenu.AddItem(new GUIContent("Remove"), false, () => reroute.RemovePoint()); contextMenu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero)); }
/// <summary> Show right-click context menu for hovered reroute </summary> void ShowRerouteContextMenu(RerouteReference reroute) { GenericMenu contextMenu = new GenericMenu(); contextMenu.AddItem(new GUIContent("Remove"), false, () => reroute.RemovePoint()); contextMenu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero)); if (NodeEditorPreferences.GetSettings().autoSave) { AssetDatabase.SaveAssets(); } }