//Append ConvertToMacro feature protected override UnityEditor.GenericMenu OnNodesContextMenu(UnityEditor.GenericMenu menu, Node[] nodes) { menu.AddItem(new GUIContent("Convert To Macro"), false, () => { FlowGraphExtensions.ConvertNodesToMacro(nodes.ToList()); }); return(menu); }
///---------------------------------------------------------------------------------------------- ///---------------------------------------UNITY EDITOR------------------------------------------- #if UNITY_EDITOR //Append menu items in canvas right click context menu (provided menu is completely overriden here) protected override UnityEditor.GenericMenu OnCanvasContextMenu(UnityEditor.GenericMenu menu, Vector2 mousePos) { return(FlowGraphExtensions.GetFullNodesMenu(this, mousePos, null, null)); }