v3.1.2
2020.3+

Class PlayerInventory

Inheritance
PlayerInventory
Namespace: Unity.Services.Economy
Syntax
[Obsolete("The interface provided by Economy.PlayerInventory has been replaced by EconomyService.Instance.PlayerInventory, and should be accessed from there instead. This API will be removed in an upcoming release.", false)]
public class PlayerInventory

Methods

AddInventoryItemAsync(String, PlayerInventory.AddInventoryItemOptions)

Declaration
[Obsolete("The interface provided by Economy.PlayerInventory.AddInventoryItemAsync(string inventoryItemId, AddInventoryItemOptions options) has been replaced by EconomyService.Instance.PlayerInventory.AddInventoryItemAsync(string inventoryItemId, AddInventoryItemOptions options), and should be accessed from there instead. This API will be removed in an upcoming release.", false)]
public async Task<PlayersInventoryItem> AddInventoryItemAsync(string inventoryItemId, PlayerInventory.AddInventoryItemOptions options = null)
Parameters
TypeNameDescription
StringinventoryItemId
PlayerInventory.AddInventoryItemOptionsoptions
Returns
TypeDescription
Task<PlayersInventoryItem>

DeletePlayersInventoryItemAsync(String, PlayerInventory.DeletePlayersInventoryItemOptions)

Declaration
[Obsolete("The interface provided by Economy.PlayerInventory.DeletePlayersInventoryItemAsync(string playersInventoryItemId, DeletePlayersInventoryItemOptions options) has been replaced by EconomyService.Instance.PlayerInventory.DeletePlayersInventoryItemAsync(string playersInventoryItemId, DeletePlayersInventoryItemOptions options), and should be accessed from there instead. This API will be removed in an upcoming release.", false)]
public async Task DeletePlayersInventoryItemAsync(string playersInventoryItemId, PlayerInventory.DeletePlayersInventoryItemOptions options = null)
Parameters
TypeNameDescription
StringplayersInventoryItemId
PlayerInventory.DeletePlayersInventoryItemOptionsoptions
Returns
TypeDescription
Task

GetInventoryAsync(PlayerInventory.GetInventoryOptions)

Declaration
[Obsolete("The interface provided by Economy.PlayerInventory.GetInventoryAsync(GetInventoryOptions options) has been replaced by EconomyService.Instance.PlayerInventory.GetInventoryAsync(GetInventoryOptions options), and should be accessed from there instead. This API will be removed in an upcoming release.", false)]
public async Task<GetInventoryResult> GetInventoryAsync(PlayerInventory.GetInventoryOptions options = null)
Parameters
TypeNameDescription
PlayerInventory.GetInventoryOptionsoptions
Returns
TypeDescription
Task<GetInventoryResult>

UpdatePlayersInventoryItemAsync(String, Dictionary<String, Object>, PlayerInventory.UpdatePlayersInventoryItemOptions)

Declaration
[Obsolete("The interface provided by Economy.PlayerInventory.UpdatePlayersInventoryItemAsync(string playersInventoryItemId, Dictionary<string, object> instanceData, UpdatePlayersInventoryItemOptions options) has been replaced by EconomyService.Instance.PlayerInventory.UpdatePlayersInventoryItemAsync(string playersInventoryItemId, Dictionary<string, object> instanceData, UpdatePlayersInventoryItemOptions options), and should be accessed from there instead. This API will be removed in an upcoming release.", false)]
public async Task<PlayersInventoryItem> UpdatePlayersInventoryItemAsync(string playersInventoryItemId, Dictionary<string, object> instanceData, PlayerInventory.UpdatePlayersInventoryItemOptions options = null)
Parameters
TypeNameDescription
StringplayersInventoryItemId
Dictionary<String, Object>instanceData
PlayerInventory.UpdatePlayersInventoryItemOptionsoptions
Returns
TypeDescription
Task<PlayersInventoryItem>