public static void ShowMenu(this VisualElement visualElement, DropdownMenu menu) { if (visualElement != null && menu != null && menu.MenuItems().Any()) { Vector2 p = new Vector2(visualElement.layout.xMin, visualElement.layout.yMax); p = visualElement.parent.LocalToWorld(p); menu.DoDisplayEditorMenu(p); } }
protected internal override void DoDisplayMenu(DropdownMenu menu, EventBase triggerEvent) { menu.DoDisplayEditorMenu(triggerEvent); }