docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetQuantity

    SetQuantity(string, int)

    Sets the quantity of an InventoryItem by InventoryItemDefinition Id.

    Declaration
    public static void SetQuantity(string itemDefinitionId, int quantity)
    Parameters
    Type Name Description
    string itemDefinitionId

    The Id of the InventoryItemDefinition we are checking for.

    int quantity

    The new value we are setting.

    SetQuantity(int, int)

    Sets the quantity of the InventoryItem within this Wallet of the specified InventoryItemDefinition by Hash

    Declaration
    public static void SetQuantity(int itemDefinitionHash, int quantity)
    Parameters
    Type Name Description
    int itemDefinitionHash

    The Hash of the InventoryItemDefinition to set quantity for.

    int quantity

    The new quantity value to set.

    SetQuantity(InventoryItem, int)

    Sets the quantity of an InventoryItem.

    Declaration
    public static void SetQuantity(InventoryItem item, int quantity)
    Parameters
    Type Name Description
    InventoryItem item

    The InventoryItem to set quantity for.

    int quantity

    The new quantity value to set.

    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)