docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SearchSelection

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

    Inheritance
    object
    SearchSelection
    Implements
    IReadOnlyCollection<SearchItem>
    IEnumerable<SearchItem>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Search
    Assembly: com.unity.quicksearch.dll
    Syntax
    public class SearchSelection : IReadOnlyCollection<SearchItem>, IEnumerable<SearchItem>, IEnumerable

    Constructors

    SearchSelection(IEnumerable<SearchItem>)

    Declaration
    public SearchSelection(IEnumerable<SearchItem> items)
    Parameters
    Type Name Description
    IEnumerable<SearchItem> items

    SearchSelection(IList<int>, ISearchList)

    Create a new SearchSelection

    Declaration
    public SearchSelection(IList<int> selection, ISearchList filteredItems)
    Parameters
    Type Name Description
    IList<int> 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
    int

    Methods

    Contains(SearchItem)

    Declaration
    public bool Contains(SearchItem item)
    Parameters
    Type Name Description
    SearchItem item
    Returns
    Type Description
    bool

    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
    int

    Returns the highest selected index.

    MinIndex()

    Lowest selected index of any item in the selection.

    Declaration
    public int MinIndex()
    Returns
    Type Description
    int

    Returns the lowest selected index.

    Implements

    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable
    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)