docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct QueryFilterOperator

    A QueryFilterOperator defines a boolean operator between a value returned by a filter and an operand inputted in the search query.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.Search
    Assembly: com.unity.quicksearch.dll
    Syntax
    public readonly struct QueryFilterOperator

    Properties

    token

    The operator identifier.

    Declaration
    public string token { get; }
    Property Value
    Type Description
    string

    valid

    Indicates if this QueryFilterOperator is valid.

    Declaration
    public bool valid { get; }
    Property Value
    Type Description
    bool

    Methods

    AddHandler<TFilterVariable, TFilterConstant>(Func<TFilterVariable, TFilterConstant, bool>)

    Adds a custom filter operator handler.

    Declaration
    public QueryFilterOperator AddHandler<TFilterVariable, TFilterConstant>(Func<TFilterVariable, TFilterConstant, bool> handler)
    Parameters
    Type Name Description
    Func<TFilterVariable, TFilterConstant, bool> handler

    Callback to handle the operation. Takes a TFilterVariable (value returned by the filter handler, will vary for each element) and a TFilterConstant (right hand side value of the operator, which is constant), and returns a boolean indicating if the filter passes or not.

    Returns
    Type Description
    QueryFilterOperator
    Type Parameters
    Name Description
    TFilterVariable

    The operator's left hand side type. This is the type returned by a filter handler.

    TFilterConstant

    The operator's right hand side type.

    AddHandler<TFilterVariable, TFilterConstant>(Func<TFilterVariable, TFilterConstant, StringComparison, bool>)

    Adds a custom filter operator handler.

    Declaration
    public QueryFilterOperator AddHandler<TFilterVariable, TFilterConstant>(Func<TFilterVariable, TFilterConstant, StringComparison, bool> handler)
    Parameters
    Type Name Description
    Func<TFilterVariable, TFilterConstant, StringComparison, bool> handler

    Callback to handle the operation. Takes a TFilterVariable (value returned by the filter handler, will vary for each element), a TFilterConstant (right hand side value of the operator, which is constant), a StringComparison option and returns a boolean indicating if the filter passes or not.

    Returns
    Type Description
    QueryFilterOperator
    Type Parameters
    Name Description
    TFilterVariable

    The operator's left hand side type. This is the type returned by a filter handler.

    TFilterConstant

    The operator's right hand side type.

    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)