Class InventoryManager
Manages all Inventories. Can subscribe to events relevant to Inventories and create and remove them here. InventoryManager also owns the main and wallet Inventories, as well as all other Inventories of InventoryItems. The InventoryManager can create Inventories from InventoryDefinitions or default Inventories as needed.
Namespace: UnityEngine .GameFoundation
Assembly: solution.dll
Syntax
public static class InventoryManager
Properties
Name | Description |
---|---|
Is |
Current initialization state of this manager. |
catalog | This is the InventoryCatalog the InventoryManager uses. |
Methods
Name | Description |
---|---|
Create |
This will create a new Inventory |
Create |
This will create a new Inventory |
Find |
Returns an item with the Id wanted. |
Find |
Get all items created from the definition with the specified |
Find |
Get all items created from the definition with the specified |
Find |
Gets items filtered with the specified |
Find |
Gets items filtered with the specified |
Find |
Gets items filtered items with the specified |
Find |
Gets items filtered with the specified |
Find |
Gets items filtered with the specified |
Find |
Gets items filtered with the specified |
Get |
Returns an array of all items in the manager. |
Get |
Fills the given list with all items in the manager. Note: this returns the current state of all items. To ensure that there are no invalid or duplicate entries, the list will always be cleared and 'recycled' (i.e. updated) with current data. |
Remove |
Removes all the items from the player inventory. |
Remove |
This method will remove the Item with the given Item Hash. |
Remove |
This method will remove the given Item. |
Remove |
This method will remove the Item that uses the InventoryItemDefinition with the given Hash. |
Remove |
This method will remove the Item that uses the given ItemDefinition. |
Throw |
Throws an exception if the InventoryManager has not been initialized. |
Events
Name | Description |
---|---|
item |
Event fired whenever a new Inventory Item is added. |
item |
Event fired whenever an Inventory Item is removed. |