docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetItem

    GetItem(string)

    Gets an InventoryItem by InventoryItemDefinition reference if it is contained within, otherwise returns null.

    Declaration
    public static InventoryItem GetItem(string itemDefinitionId)
    Parameters
    Type Name Description
    string itemDefinitionId

    The Id of the InventoryItem to find.

    Returns
    Type Description
    InventoryItem

    The InventoryItem or null if not found.

    GetItem(int)

    Gets an InventoryItem by InventoryItemDefinition Hash if it is contained within, otherwise returns null.

    Declaration
    public static InventoryItem GetItem(int itemDefinitionHash)
    Parameters
    Type Name Description
    int itemDefinitionHash

    The InventoryItemDefinition Hash of the InventoryItem to find.

    Returns
    Type Description
    InventoryItem

    The InventoryItem or null if not found.

    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)