Inventory in UI

The inventory in the UI is just a visual representation of the real inventory, it allows you to organize items, seven sequential slots, equip, unequip and drop items.

All Inventory in the UI is already configured in all user interfaces, you can simply modify it to be the way you want, but if you want to build from scratch it is important to read this page.

Inventory UI Manager

This script manages and creates the slots. It can also be used to view loot items.

PropertiesDescription

Inventory Screeen

It is the screen where all the Inventory UI elements reside.

Target Inventory

Inventory you want to inspect the items. Leave empty if you want to inspect the player's items.

Slot Prefab

Prefab configured from a standard slot.

Hide Cursor When Exit Inventory

Hide mouse cursor when exit inventory. ⚠ Pay attention to the player's configuration so that it doesn't block the FireMode when this option is unchecked.

Lock Cursor When Exit Inventory

Lock mouse cursor when exit inventory

Show Cursor When Open Inventory

Show mouse cursor when open inventory

Filter Left Hand Items

When this option is checked the left hand items do not appear.

Slots Quantity

Number of Slots to instantiate.

Inventory Scroll View Content

Content of a ScrollView that contains the Grid Layout Group component, which will automatically arrange the Slot spacing.

Slots

Generated slots (not necessarily, if you set the Slots Quantity to 0 and assign the slots here, it's the same)

Is Loot View

This option create a loot checker and will always activate the Loot View screen when the player rolls over a loot. ⚠ Use an Inventory UI Manager for Loot View.

Player

The player, you can leave this variable empty.

Character Layer

Character layer, if you are using another layer for Loot, add the option here.

Check Loot Radius

Radius that the player can collect loot.

See below how to set the elements:

Inventory Slot UI

This component is fundamental for the functioning of the Inventory UI, with it it is possible to draw icons of items in the slot, equip when dropping an item in the slot, set and draw sequential items.

PropertiesDescription

Inventory

inventário para a troca de informação

Item ID To Draw

ID of the item to be drawn ⚠ if it is a slot generated by the Inventory UI Manager, this ID is automatically set

Draw Sequential Item

Draw the item by sequence and not by ID

Sequential To Draw

Sequential Slot to draw the item ⚠ Example: draw the player's primary weapon, which would be in the first slot

Set Sequential On Drop

Sets the item in Sequential Slot of inventory when an item is dropped in this slot. ⚠ This option should not be used on normal slots instantiated by Inventory UI Manager.

Slot Item Image

Image that will draw the icons of the items

Slot Health Bar

Image(Filled Type) in to show the "health" of the item.

Item Without Icon Sprite

Sprite that will appear when the item doesn't have a sprite icon assigned.

Empty Slot Sprite

Sprite that will appear when the slot is empty.

Item Quantity Text

Text that counts the quantity of the items

Outline

Image that do an outline effect when the cursor is over the slot.

Enable Options

Activates the buttons that appear when you click on the slot (Use, Equip, Unequip, Drop)

Auto Equip On Drop

Equip an item on drop in this slot

Is a Loot Slot

Informs other slots and Inventory UI Managers that this slot comes from a loot ⚠ No need to create a different slot for loots, Loot View checks this option automatically

Allow Items With Tags

Item filter by tags, here you put the tags of the type of item that the slot can support ⚠ Example: Primary Weapon tag and etc...

Allow Any Item

Allow any item regardless of item tag

Options Panel

Panel with all Option Buttons inside (Use, Equip, Unequip, Drop)

Equip Button

Equip Button in Slot

Unequip Button

Unequip Button in Slot

Use Button

Use Button in Slot

Drop Button

Drop Button in Slot

Last updated