public sealed class NodeSearchPopupCreate-a-node by typing, and by dragging a wire into empty space.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
This is the feature the UX target is judged by. Doc 11 names Unity's shader graph as best-in-class and names searchable creation from a dragged wire as the reason. A create menu of nested submenus is what a graph editor has instead when nobody built this.
⚠ The field keeps the focus and the rows never take it, the same arrangement CommandPalette has and for the same reason: a popup where Down moved the focus into the list is one where the next letter typed goes nowhere. The arrows move a highlight this class owns.
Filtered by the wire, not merely opened by it. A wire dragged off a texture output offers the node types with a texture input, and the row says which port it would land on — so the gesture is one drag and one Enter rather than a drag, a menu, a guess and a second drag.
Fields and properties (8)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
public int LimitHow many results are shown.
public SearchBox FieldWhat is typed into it.
public UiElement ListWhere the rows go.
public UiElement EmptyPartWhat it says when nothing matched.
public IReadOnlyList<NodeSearchResult> ResultsWhat it is showing, best first.
public int HighlightedWhich result is highlighted, or -1 when there are none.
public PortFilter? FilterThe port a dragged wire is looking for, when the popup was opened by one.
Events (1)
public Action<NodeSearchPopup, NodeSearchResult>? AcceptedRaised when a node type is chosen.
Methods (4)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public void Show(NodeTypeRegistry library, PortFilter? wire, float x, float y)Opens it at a point, over everything.
public bool Accept()Chooses the highlighted result, as Enter does.
public void Highlight(int delta)Moves the highlight.
Used by (2)
- NodeGraphViewVixen.Editor.NodeGraph
- ViewTestsVixen.Editor.NodeGraph.Tests