Class NodeSearchWindow
Node search window for adding new nodes.
Inheritance
System.Object
NodeSearchWindow
Implements
ISearchWindowProvider
Namespace: InsaneScatterbrain.ScriptGraph.Editor.NodeSearch
Syntax
public class NodeSearchWindow : ScriptableObject
Methods
CreateSearchTree(SearchWindowContext)
Declaration
public List<SearchTreeEntry> CreateSearchTree(SearchWindowContext context)
Parameters
Type | Name | Description |
---|---|---|
SearchWindowContext | context |
Returns
Type | Description |
---|---|
List<SearchTreeEntry> |
Initialize(ScriptGraphView, ScriptNodeViewTypesRegistry)
Initializes the node search window.
Declaration
public void Initialize(ScriptGraphView view, ScriptNodeViewTypesRegistry registry)
Parameters
Type | Name | Description |
---|---|---|
ScriptGraphView | view | The script graph view that it's a part of. |
ScriptNodeViewTypesRegistry | registry | The node view types registry. |
OnSelectEntry(SearchTreeEntry, SearchWindowContext)
Declaration
public bool OnSelectEntry(SearchTreeEntry entry, SearchWindowContext context)
Parameters
Type | Name | Description |
---|---|---|
SearchTreeEntry | entry | |
SearchWindowContext | context |
Returns
Type | Description |
---|---|
System.Boolean |
Open(Vector2, Vector2, ISearchFilter, Action<IScriptNode>)
Opens the node search window at the given position.
Declaration
public void Open(Vector2 menuPosition, Vector2 newPlacementPosition, ISearchFilter applySearchFilter = null, Action<IScriptNode> applyNodeAddedCallback = null)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | menuPosition | The position to open the menu. |
Vector2 | newPlacementPosition | The position a new node will be placed, if one's created. |
ISearchFilter | applySearchFilter | The search filter to apply on the entries. |
Action<IScriptNode> | applyNodeAddedCallback | The callback, called when a new node has been added. |
Implements
ISearchWindowProvider