docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetItemQuantity

    SetItemQuantity(string, string, int, int, Completer)

    Request to update the given quantity for the item matching the given definition in the given inventory.

    Declaration
    void SetItemQuantity(string inventoryId, string itemDefinitionId, int quantity, int gameItemId, Completer completer)
    Parameters
    Type Name Description
    string inventoryId

    The id of the inventory to update.

    string itemDefinitionId

    The id of the definition of the item we want to update the quantity of.

    int quantity

    Quantity of item to set. Note that 0 or negative values will not remove the item from the inventory.

    int gameItemId

    Id of the item use by GameItemLookup.

    Completer completer

    The handle to settle the promise with.

    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)