Class SearchSelection | Quick Search | 2.0.0
docs.unity3d.com
    Show / Hide Table of Contents

    Class SearchSelection

    Class giving readonly access to the current list of selected items in QuickSearch.

    Inheritance
    Object
    SearchSelection
    Namespace: Unity.QuickSearch
    Syntax
    public class SearchSelection : IReadOnlyCollection<SearchItem>

    Constructors

    SearchSelection(IList<Int32>, ISearchList)

    Create a new SearchSelection

    Declaration
    public SearchSelection(IList<int> selection, ISearchList filteredItems)
    Parameters
    Type Name Description
    IList<Int32> selection

    Current list of selected SearchItem indices.

    ISearchList filteredItems

    List of SearchItem displayed in QuickSearch.

    Properties

    Count

    How many items are selected.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    Methods

    First()

    Get the first selected item in the selection.

    Declaration
    public SearchItem First()
    Returns
    Type Description
    SearchItem

    First select item in selection. Returns null if no item are selected

    GetEnumerator()

    Get an enumerator on the currently selected SearchItems.

    Declaration
    public IEnumerator<SearchItem> GetEnumerator()
    Returns
    Type Description
    IEnumerator<SearchItem>

    Enumerator on the currently selected SearchItems.

    Last()

    Get the last selected item in the selection.

    Declaration
    public SearchItem Last()
    Returns
    Type Description
    SearchItem

    Last select item in selection. Returns null if no item are selected

    MaxIndex()

    Highest selected index of any item in the selection.

    Declaration
    public int MaxIndex()
    Returns
    Type Description
    Int32

    Returns the highest selected index.

    MinIndex()

    Lowest selected index of any item in the selection.

    Declaration
    public int MinIndex()
    Returns
    Type Description
    Int32

    Returns the lowest selected index.

    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