v3.1.2
2020.3+

Class PlayersInventoryItem

Represents a single player's inventory item. This is an inventory item unique to a specific player.

Inheritance
PlayersInventoryItem
Namespace: Unity.Services.Economy.Model
Syntax
[Preserve]
public class PlayersInventoryItem

Constructors

PlayersInventoryItem(String, String, IDeserializable, String, EconomyDate, EconomyDate)

Declaration
[Preserve]
public PlayersInventoryItem(string playersInventoryItemId = null, string inventoryItemId = null, IDeserializable instanceData = null, string writeLock = null, EconomyDate created = null, EconomyDate modified = null)
Parameters
TypeNameDescription
StringplayersInventoryItemId
StringinventoryItemId
IDeserializableinstanceData
StringwriteLock
EconomyDatecreated
EconomyDatemodified

Fields

Created

The date this players inventory item was created as an EconomyDate object.

Declaration
[Preserve]
public EconomyDate Created
Field Value
TypeDescription
EconomyDate

InstanceData

Any instance data specific to this unique item in the player's inventory.

Declaration
[Preserve]
public IDeserializable InstanceData
Field Value
TypeDescription
IDeserializable

InventoryItemId

The configuration ID of the inventory item.

Declaration
[Preserve]
public string InventoryItemId
Field Value
TypeDescription
String

Modified

The date this players inventory item was modified as an EconomyDate object.

Declaration
[Preserve]
public EconomyDate Modified
Field Value
TypeDescription
EconomyDate

PlayersInventoryItemId

The ID of the unique item specific to this player's inventory.

Declaration
[Preserve]
public string PlayersInventoryItemId
Field Value
TypeDescription
String

WriteLock

The current WriteLock string.

Declaration
[Preserve]
public string WriteLock
Field Value
TypeDescription
String

Methods

GetItemDefinition()

Gets the configuration definition associated with this player's inventory item.

Declaration
public InventoryItemDefinition GetItemDefinition()
Returns
TypeDescription
InventoryItemDefinition

The InventoryItemDefinition associated with this player's inventory item

Exceptions
TypeCondition
EconomyException

Thrown if request is unsuccessful

GetItemDefinitionAsync()

Gets the configuration definition associated with this player's inventory item.

Declaration
[Obsolete("This has been replaced with GetItemDefinition which is not asynchronous and should be accessed from there instead. This API will be removed in an upcoming release.", false)]
public async Task<InventoryItemDefinition> GetItemDefinitionAsync()
Returns
TypeDescription
Task<InventoryItemDefinition>

The InventoryItemDefinition associated with this player's inventory item

Exceptions
TypeCondition
EconomyException

Thrown if request is unsuccessful