Inventory¶
Inventory is a place where you store and manage items and equipment in games. This Inventory community component (Component) allows you to set up an inventory and customize pick-up settings, capacity limits, audio and distance cues, and allowed equipment types. Additionally, with the Component, you can define the hotbar slots available within the inventory.
Property | Description |
---|---|
Enable inventory | Determines whether an inventory is available in-game to store and manage items and equipment. |
Pick-up mode | Determines how players pick up items:
|
Capacity | The maximum number of slots in an inventory, ranging from 20 to 100 |
Pick-up audio | The audio clip to play when players pick up items |
Pick-up distance | The distance at which items can be picked up |
Enable accessories | Determines whether accessories can be placed into the inventory |
Accessories slots | The maximum number of slots reserved for accessories in an inventory when accessories are enabled, ranging from 1 to 5 |
Enable weapons | Determines whether weapons can be placed into the inventory |
Enable hotbar | Determines whether a hotbar is added to the inventory for quick access and use of items |
Hotbar slots | The maximum number of hotbar slots, ranging from 1 to 6 |
Equip Mode | Determines how players equip a piece of equipment on their avatar character:
|
Match equip type | Applies the equipment to the corresponding part of the player's avatar character based on the equipment type if this option is enabled. The equipment type is set during equipment creation. For example, Helmet-type equipment will be equipped on the head of the avatar character. Otherwise, the equipment will be equipped randomly on the avatar character. |
Show equip rarity | Shows how rare the piece of equipment is if this option is enabled. The rarity is set during equipment creation. |
Note:
As this is a global Component, you can attach this Component to any object in the scene. However, it's a best practice to create an empty object named "GameManager" and attach this Component to it.