Class InventoryItemSerializableData | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class InventoryItemSerializableData

    Serializable data structure that contains the state of an inventory item.

    Inheritance
    System.Object
    InventoryItemSerializableData
    Namespace: UnityEngine.GameFoundation.DataPersistence
    Syntax
    [Serializable]
    public class InventoryItemSerializableData

    Constructors

    InventoryItemSerializableData()

    Default constructor for serialization purpose.

    Declaration
    public InventoryItemSerializableData()

    InventoryItemSerializableData(String, Int32, Int32)

    Basic constructor that takes in the inventory item definition Id of the item and the quantity it have in this inventory.

    Declaration
    public InventoryItemSerializableData(string definitionId, int quantity, int gameItemLookupId)
    Parameters
    Type Name Description
    System.String definitionId

    The definition Id of the inventory item

    System.Int32 quantity

    The quantity of this item contained in the inventory

    System.Int32 gameItemLookupId

    The GameItemId of the item use by GameItemLookup

    Properties

    definitionId

    The definition Id of the inventory item

    Declaration
    public string definitionId { get; }
    Property Value
    Type Description
    System.String

    gameItemLookupId

    The GameItemId of the item use by GameItemLookup

    Declaration
    public int gameItemLookupId { get; }
    Property Value
    Type Description
    System.Int32

    quantity

    The quantity of the inventory item in the inventory.

    Declaration
    public int quantity { get; }
    Property Value
    Type Description
    System.Int32
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX