docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method FindItemsByCategory

    FindItemsByCategory(CategoryAsset, ICollection<TItemAsset>)

    Fills in the given target collection with all TItemAsset instances of this catalog matching the given category and returns their count. The target collection is cleared before being populated.

    Declaration
    public int FindItemsByCategory(CategoryAsset category, ICollection<TItemAsset> target = null)
    Parameters
    Type Name Description
    CategoryAsset category

    The Category instance used as a filter

    ICollection<TItemAsset> target

    The target container of all the matching TItemAsset instances.

    Returns
    Type Description
    int

    The number of TItemAsset instances matching the category filter in this catalog.

    FindItemsByCategory(string, ICollection<TItemAsset>)

    Fills in the given target collection with all TItemAsset instances of this catalog matching the CategoryAsset by its id and returns their count. The target collection is cleared before being populated.

    Declaration
    public int FindItemsByCategory(string id, ICollection<TItemAsset> target = null)
    Parameters
    Type Name Description
    string id

    The identifier of the CategoryAsset instance used as a filter

    ICollection<TItemAsset> target

    The target container of all the matching TItemAsset instances.

    Returns
    Type Description
    int

    The number of TItemAsset instances matching the category filter in this catalog.

    FindItemsByCategory<TInheritedItemAsset>(CategoryAsset, ICollection<TItemAsset>)

    Fills in the given target collection with all TInheritedItemAsset instances of this catalog matching the given category and returns their count. The target collection is cleared before being populated.

    Declaration
    public int FindItemsByCategory<TInheritedItemAsset>(CategoryAsset category, ICollection<TItemAsset> target = null) where TInheritedItemAsset : TItemAsset
    Parameters
    Type Name Description
    CategoryAsset category

    The CategoryAsset instance used as a filter

    ICollection<TItemAsset> target

    The target container of all the matching TInheritedItemAsset instances.

    Returns
    Type Description
    int

    The number of TInheritedItemAsset instances matching the category filter in this catalog.

    Type Parameters
    Name Description
    TInheritedItemAsset

    FindItemsByCategory<TInheritedItemAsset>(CategoryAsset)

    Returns an array of all the TInheritedItemAsset instances of this catalog matching the given category

    Declaration
    public TItemAsset[] FindItemsByCategory<TInheritedItemAsset>(CategoryAsset category) where TInheritedItemAsset : TItemAsset
    Parameters
    Type Name Description
    CategoryAsset category

    The CategoryAsset instance used as a filter

    Returns
    Type Description
    TItemAsset[]

    The number of TInheritedItemAsset instances matching the category filter in this catalog.

    Type Parameters
    Name Description
    TInheritedItemAsset

    FindItemsByCategory<TInheritedItemAsset>(string, ICollection<TItemAsset>)

    Fills in the given target collection with all TInheritedItemAsset instances of this catalog matching the category by its id and returns their count. The target collection is cleared before being populated.

    Declaration
    public int FindItemsByCategory<TInheritedItemAsset>(string id, ICollection<TItemAsset> target = null) where TInheritedItemAsset : TItemAsset
    Parameters
    Type Name Description
    string id
    ICollection<TItemAsset> target

    The target container of all the matching TInheritedItemAsset instances.

    Returns
    Type Description
    int

    The number of TInheritedItemAsset instances matching the category filter in this catalog.

    Type Parameters
    Name Description
    TInheritedItemAsset

    FindItemsByCategory<TInheritedItemAsset>(string)

    Returns an array of all the TInheritedItemAsset instances of this catalog matching the CategoryAsset by its id

    Declaration
    public TItemAsset[] FindItemsByCategory<TInheritedItemAsset>(string id) where TInheritedItemAsset : TItemAsset
    Parameters
    Type Name Description
    string id

    The CategoryAsset instance used as a filter

    Returns
    Type Description
    TItemAsset[]

    The number of TInheritedItemAsset instances matching the category filter in this catalog.

    Type Parameters
    Name Description
    TInheritedItemAsset

    FindItemsByCategory(CategoryAsset)

    Returns an array of all the TItemAsset instances of this catalog matching the given category

    Declaration
    public TItemAsset[] FindItemsByCategory(CategoryAsset category)
    Parameters
    Type Name Description
    CategoryAsset category
    Returns
    Type Description
    TItemAsset[]

    The number of TItemAsset instances matching the category filter in this catalog.

    FindItemsByCategory(string)

    Returns an array of all the TItemAsset instances of this catalog matching the CategoryAsset by its id

    Declaration
    public TItemAsset[] FindItemsByCategory(string id)
    Parameters
    Type Name Description
    string id

    The CategoryAsset instance used as a filter

    Returns
    Type Description
    TItemAsset[]

    The number of TItemAsset instances matching the category filter in this catalog.

    In This Article
    Back to top
    Copyright © 2024 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)