Class QueryGraph
Class that represents a query graph.
Namespace: UnityEditor.Search
Syntax
public class QueryGraph
Constructors
QueryGraph(IQueryNode)
Constructor. Creates a new query graph.
Declaration
public QueryGraph(IQueryNode root)
Parameters
Type | Name | Description |
---|---|---|
IQueryNode | root | Root node of the graph. |
Properties
empty
Returns true if the graph is empty.
Declaration
public bool empty { get; }
Property Value
Type | Description |
---|---|
Boolean |
root
Root node of the graph. Can be null.
Declaration
public IQueryNode root { get; }
Property Value
Type | Description |
---|---|
IQueryNode |
Methods
Optimize(Boolean, Boolean)
Optimize the graph.
Declaration
public void Optimize(bool propagateNotToLeaves, bool swapNotToRightHandSide)
Parameters
Type | Name | Description |
---|---|---|
Boolean | propagateNotToLeaves | Propagate "Not" operations to leaves, so only leaves can have "Not" operations as parents. |
Boolean | swapNotToRightHandSide | Swaps "Not" operations to the right hand side of combining operations (i.e. "And", "Or"). Useful if a "Not" operation is slow. |
Optimize(QueryGraphOptimizationOptions)
Optimize the graph.
Declaration
public void Optimize(QueryGraphOptimizationOptions options)
Parameters
Type | Name | Description |
---|---|---|
QueryGraphOptimizationOptions | options | Optimization options. |