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

    Class InventorySerializableData

    Serializable data structure that contains the state of an inventory.

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

    Constructors

    InventorySerializableData()

    Default constructor for serialization purpose

    Declaration
    public InventorySerializableData()

    InventorySerializableData(String, String, InventoryItemSerializableData[], Int32)

    Basic constructor that takes in an inventory definition id and an array of InventoryItemData of all inventory items contained in the inventory.

    Declaration
    public InventorySerializableData(string definitionId, string inventoryId, InventoryItemSerializableData[] items, int gameItemLookupId)
    Parameters
    Type Name Description
    System.String definitionId

    The definition id of the inventory

    System.String inventoryId
    InventoryItemSerializableData[] items

    The inventory items contained in the inventory

    System.Int32 gameItemLookupId

    The GameItemId of the item use by GameItemLookup

    Properties

    definitionId

    The definition Id of the inventory

    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

    inventoryId

    The inventory id of the inventory

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

    items

    The items this inventory contains

    Declaration
    public InventoryItemSerializableData[] items { get; }
    Property Value
    Type Description
    InventoryItemSerializableData[]
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX