docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetItemsByCategory

    GetItemsByCategory(string)

    Returns all an array of items in the wallet with the given category id.

    Declaration
    public static InventoryItem[] GetItemsByCategory(string categoryId)
    Parameters
    Type Name Description
    string categoryId

    The category id to check.

    Returns
    Type Description
    InventoryItem[]

    An array of items in the wallet with the given category id.

    GetItemsByCategory(string, List<InventoryItem>)

    Fills the given list with items with the given category id.

    Declaration
    public static void GetItemsByCategory(string categoryId, List<InventoryItem> inventoryItems)
    Parameters
    Type Name Description
    string categoryId

    The category id to check.

    List<InventoryItem> inventoryItems

    The list to fill up.

    GetItemsByCategory(CategoryDefinition)

    This will return all InventoryItems that have the given Category through an array.

    Declaration
    public static InventoryItem[] GetItemsByCategory(CategoryDefinition categoryDefinition)
    Parameters
    Type Name Description
    CategoryDefinition categoryDefinition

    The CategoryDefinition we are checking for.

    Returns
    Type Description
    InventoryItem[]

    An array of the InventoryItems that have the given Category.

    GetItemsByCategory(CategoryDefinition, List<InventoryItem>)

    Fills the given list with items with the given category.

    Declaration
    public static void GetItemsByCategory(CategoryDefinition categoryDefinition, List<InventoryItem> inventoryItems)
    Parameters
    Type Name Description
    CategoryDefinition categoryDefinition

    The category to check.

    List<InventoryItem> inventoryItems

    The list to fill up.

    GetItemsByCategory(int)

    This will return an array of all InventoryItems that have the given Category by CategoryDefinition id hash.

    Declaration
    public static InventoryItem[] GetItemsByCategory(int categoryHash)
    Parameters
    Type Name Description
    int categoryHash

    The id hash of the CategoryDefinition to check.

    Returns
    Type Description
    InventoryItem[]

    An array of the InventoryItems that have the given Category.

    GetItemsByCategory(int, List<InventoryItem>)

    Fills the given list with items with the given category hash.

    Declaration
    public static void GetItemsByCategory(int categoryHash, List<InventoryItem> inventoryItems)
    Parameters
    Type Name Description
    int categoryHash

    The id hash of the CategoryDefinition to check.

    List<InventoryItem> inventoryItems

    The list to fill up.

    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)