Inventory
Stores items and currencies.

The Inventory component is a powerful container for managing items and currency. It can organize items based on configurable grid properties, track item weights, and provides a wide range of customization options for different inventory setups.
Check out its scripting section to learn about its full potential.
InventoryProperties
Behaviour
Enable Item Dropping
If the player should be allowed to drop items from this inventory.
Destroy Items On Drop
If items should be immediately lost when they're dropped. This means an item drop instance won't be created for items when they're dropped.
Can Receive Rewards
If this inventory can receive rewards. Disabling this is useful when you need to allow reward items inside an inventory without automatically obtaining the rewards.
Grid & Space
Enable Grid
Only disable this if you don't plan on using grid logic at all. If disabled, the inventory will add items without any grid-based checks and won't touch item placements whatsoever. Note that this will also prevent Inventory Blocks from displaying the inventory.
Layout Mode
The grid layout mode.
Organization Mode
The item organization mode.
Auto Sorting Algorithm
The sorting algorithm to use when items are automatically placed.
Trickle Filtered Placement
If the item placement should "trickle down" when filtering is enabled.
Grid Size
The size of the grid. If the Layout Mode is set to Infinite Grid, this is used as the minimum grid size.
Expandable Width
If the grid should be expanded by width when necessary to fit items.
Expandable Height
If the grid should be expanded by height when necessary to fit items.
Enable Auto Shrink
If the grid should try to shrink itself back to the starting grid size.
Pages
The number of pages in this inventory. This is relevant when pagination is enabled. This is used as the minimum number of pages when set to Infinite Pagination.
Weights
Enable Weights
If enabled, the inventory will keep track of the total weight of items and if the max weight has been entered/exited.
Max Weight
The maximum total weight the inventory can hold.
Disallow Items If Max Weight
If the player should not be able to obtain new items if the weight has reached the max value.
Accepted Item Types
A list of all item types that the inventory should accept. Leave this list empty to accept items of any type. Items of unsupported types will be rejected.
Currencies
A list of all currencies that the inventory supports. Currencies must be specified. Leaving this list empty means that the inventory does not support any currency (all currency transactions will fail).
Events
On Item Added
A callback for when an item is added to the inventory. This accepts 1 argument: the added item (Item Stack).
On Item Removed
A callback for when an item is added to the inventory. This accepts 1 argument: the removed item (Item Stack).
On Item Picked Up
A callback for when an item is picked up. This accepts 2 arguments: the item picked up (ItemStack), the item drop ID (string).
On Item Dropped
A callback for when an item is dropped. This accepts 1 argument: the item dropped (ItemStack).
On Currency Added
A callback for when currency is added. This accepts 1 argument: the amount added (Currency).
On Currency Removed
A callback for when currency is removed. This accepts 1 argument: the amount removed (Currency).
On Max Weight Exceeded
A callback for when the weight limit is exceeded.
On Max Weight Exited
A callback for when the weight limit is exited.
On Changed
A callback for when any item or currency is added or removed.
Misc
Default Drop Transform
The default transform used as the position reference to spawn dropped items.
Force 1x1
Forces all item sizes to be 1x1.
Testing
Test Box
A test loot box for immediate runtime testing purposes.
All other options can be used for quick testing only in play mode.
Supported Block Binding
The component itself OR its properties can be bound with the following:
Last updated