Class Inventory
Contains a runtime list of InventoryItems as well as details which effect this Inventory.
Inheritance
Inherited Members
Namespace: UnityEngine .GameFoundation
Assembly: solution.dll
Syntax
public class Inventory : BaseCollection<InventoryDefinition, Inventory, InventoryItemDefinition, InventoryItem>
Properties
Name | Description |
---|---|
main | This is a reference to the InventoryManager's main Inventory. |
Methods
Name | Description |
---|---|
Add |
Adds a new entry of the specified InventoryItemDefinition by Hash. Returns the new (or existing) reference to the instance. Returns the new reference to the instance when the item didn't already exist in the Inventory and returns an existing reference when to the instance when the Item was already in the Inventory. Items added to the wallet Inventory must contain an attached CurrencyDetailDefinition. |
Get |
Gets the requested item definition based on the given hash. |
Get |
Gets the Quantity of an InventoryItem by its InventoryItemDefinition hash |
Get |
Gets the Quantity of an InventoryItem by its InventoryItemDefinition id |
Get |
Gets the Quantity of an InventoryItem by its reference |
Set |
Sets the quantity of the specified InventoryItem by InventoryItemDefinition Hash in this Inventory. |
Set |
Sets the quantity of the specified InventoryItem by InventoryItemDefinition Id in this Inventory. |
Set |
Sets the quantity of the InventoryItem instance within this Inventory. |
To |
Returns a summary string for this Inventory. |