docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetDefinitionsByCategory

    GetDefinitionsByCategory(string)

    This will return an array of GameItemDefinitions with the designated Category.

    Declaration
    public GameItemDefinition[] GetDefinitionsByCategory(string categoryId)
    Parameters
    Type Name Description
    string categoryId

    The id string of the Category we want to iterate.

    Returns
    Type Description
    GameItemDefinition[]

    An array of GameItemDefinitions that contain the given Category.

    GetDefinitionsByCategory(string, List<GameItemDefinition>)

    Fills the given list with the GameItemDefinitions that have the designated category. Note: this returns the current state of game item definitions. To ensure that there are no invalid or duplicate entries, the 'gameItemDefinitions' list will always be cleared and 'recycled' (i.e. updated) with current data from the catalog.

    Declaration
    public void GetDefinitionsByCategory(string categoryId, List<GameItemDefinition> gameItemDefinitions)
    Parameters
    Type Name Description
    string categoryId

    The id string of the Category we want to iterate.

    List<GameItemDefinition> gameItemDefinitions

    The list to clear and fill with matching data.

    GetDefinitionsByCategory(int)

    This will return an array of GameItemDefinitions with the designated Category.

    Declaration
    public GameItemDefinition[] GetDefinitionsByCategory(int categoryHash)
    Parameters
    Type Name Description
    int categoryHash

    The id hash of the Category we want to iterate.

    Returns
    Type Description
    GameItemDefinition[]

    An array of GameItemDefinitions that contain the requested Category.

    GetDefinitionsByCategory(int, List<GameItemDefinition>)

    Fills the given list with the GameItemDefinitions that have the designated category. Note: this returns the current state of game item definitions. To ensure that there are no invalid or duplicate entries, the 'gameItemDefinitions' list will always be cleared and 'recycled' (i.e. updated) with current data from the catalog.

    Declaration
    public void GetDefinitionsByCategory(int categoryHash, List<GameItemDefinition> gameItemDefinitions)
    Parameters
    Type Name Description
    int categoryHash

    The id hash of the Category we want to iterate.

    List<GameItemDefinition> gameItemDefinitions

    The list to clear and fill with matching data.

    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)