docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class QueryGraph

    Class that represents a query graph.

    Inheritance
    object
    QueryGraph
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Search
    Assembly: com.unity.quicksearch.dll
    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
    bool

    root

    Root node of the graph. Can be null.

    Declaration
    public IQueryNode root { get; }
    Property Value
    Type Description
    IQueryNode

    Methods

    Optimize(bool, bool)

    Optimize the graph.

    Declaration
    public void Optimize(bool propagateNotToLeaves, bool swapNotToRightHandSide)
    Parameters
    Type Name Description
    bool propagateNotToLeaves

    Propagate "Not" operations to leaves, so only leaves can have "Not" operations as parents.

    bool 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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)