docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SearchHandler<TData>

    The built in search handler.

    Inheritance
    object
    SearchHandler<TData>
    Implements
    ISearchHandler
    ISearchQueryHandler<TData>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Properties.UI
    Assembly: Unity.Properties.UI.Editor.dll
    Syntax
    public sealed class SearchHandler<TData> : ISearchHandler, ISearchQueryHandler<TData>
    Type Parameters
    Name Description
    TData

    Constructors

    SearchHandler(SearchElement)

    Initializes a new SearchHandler<TData> for the specified search element.

    Declaration
    public SearchHandler(SearchElement element)
    Parameters
    Type Name Description
    SearchElement element

    The SearchElement.

    Remarks

    The search handler is automatically registered to the given element.

    Properties

    MaxFrameProcessingTimeMs

    The maximum amount of time in milliseconds to spend on filtering each frame.

    Declaration
    public int MaxFrameProcessingTimeMs { get; set; }
    Property Value
    Type Description
    int

    Mode

    The active search mode to use. SearchHandlerType.

    Declaration
    public SearchHandlerType Mode { get; set; }
    Property Value
    Type Description
    SearchHandlerType

    SearchDataBatchMaxSize

    The maximum number of elements to process in each enumerator batch.

    Declaration
    public int SearchDataBatchMaxSize { get; set; }
    Property Value
    Type Description
    int

    SearchDataType

    Gets the strongly typed search data type.

    Declaration
    public Type SearchDataType { get; }
    Property Value
    Type Description
    Type

    Methods

    SetSearchDataProvider(Func<IEnumerable<TData>>)

    Sets the callback used to gather the search data.

    Declaration
    public void SetSearchDataProvider(Func<IEnumerable<TData>> getSearchDataFunc)
    Parameters
    Type Name Description
    Func<IEnumerable<TData>> getSearchDataFunc

    The callback to be invoked when gathering search data.

    Stop()

    Stops any currently running search.

    Declaration
    public void Stop()

    Events

    OnBeginSearch

    Callback invoked when a new search is started.

    Declaration
    public event Action<ISearchQuery<TData>> OnBeginSearch
    Event Type
    Type Description
    Action<ISearchQuery<TData>>

    OnEndSearch

    Callback invoked when a search is completed.

    Declaration
    public event Action<ISearchQuery<TData>> OnEndSearch
    Event Type
    Type Description
    Action<ISearchQuery<TData>>

    OnFilter

    Callback invoked when receiving a batch of filtered data.

    Declaration
    public event Action<ISearchQuery<TData>, IEnumerable<TData>> OnFilter
    Event Type
    Type Description
    Action<ISearchQuery<TData>, IEnumerable<TData>>

    Implements

    ISearchHandler
    ISearchQueryHandler<TData>
    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)