docs.unity3d.com
    Show / Hide Table of Contents

    Class Query<T>

    A Query defines an operation that can be used to filter a data set.

    Inheritance
    Object
    Query<T, IEnumerable<T>>
    Query<T>
    Inherited Members
    Query<T, IEnumerable<T>>.text
    Query<T, IEnumerable<T>>.valid
    Query<T, IEnumerable<T>>.errors
    Query<T, IEnumerable<T>>.tokens
    Query<T, IEnumerable<T>>.Apply(IEnumerable<T>)
    Query<T, IEnumerable<T>>.Optimize(Boolean, Boolean)
    Query<T, IEnumerable<T>>.Optimize(QueryGraphOptimizationOptions)
    Query<T, IEnumerable<T>>.GetNodeAtPosition(Int32)
    Namespace: UnityEditor.Search
    Syntax
    public class Query<T> : Query<T, IEnumerable<T>>
    Type Parameters
    Name Description
    T

    The filtered data type.

    Properties

    returnPayloadIfEmpty

    Boolean indicating if the original payload should be return when the query is empty. If set to false, an empty array is returned instead.

    Declaration
    public bool returnPayloadIfEmpty { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    Apply(IEnumerable<T>)

    Apply the filtering on an IEnumerable data set.

    Declaration
    public override IEnumerable<T> Apply(IEnumerable<T> data)
    Parameters
    Type Name Description
    IEnumerable<T> data

    The data to filter

    Returns
    Type Description
    IEnumerable<T>

    A filtered IEnumerable.

    Overrides
    UnityEditor.Search.Query<T, System.Collections.Generic.IEnumerable<T>>.Apply(System.Collections.Generic.IEnumerable<T>)

    Test(T)

    Test the query on a single object. Returns true if the test passes.

    Declaration
    public bool Test(T element)
    Parameters
    Type Name Description
    T element

    A single object to be tested.

    Returns
    Type Description
    Boolean

    True if the object passes the query, false otherwise.

    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