docs.unity3d.com
    Show / Hide Table of Contents

    Class QueryGraph

    Class that represents a query graph.

    Inheritance
    Object
    QueryGraph
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023