Item Hotbar

The Item Hotbar uses an Item View Slots Container to display and use Items. To create an Item Hotbar with use the UI Designer Hotbar tab. To learn more about Item View Slots Containers see this page.

Note: Hotbars are very game specific. Our solution allows you to assingn the items to monitor in each slot. The items do not move within the Inventory.

Another option is to use the Item Slot Collection View (aka Equipment UI) as a hotbar. A Feature Demo scene called “Hotbar” showcases this use case.

If neither of these options suits your needs it is recommended to create your own custom hotbar by inheriting the Item View Slot Container Base class which will automatically work with item view drawer, drag/drop and item actions.

An Item Hotbar requires an Item View Slots Container and also benefits from an Item View Drawer and an Item View Slots Container Category Item Action Set Binding.

The Item View Slots Container orders items by index which allows the hotbar to easily get the Item View Slot for any index. The Item Hotbar uses events to capture input from the Inventory Input it is bound to. The hotbar can be refreshed each time the bound inventory is updated to keep the item amounts/states always up to date.

hotbar.AssignItemToSlot(itemInfo, itemSlotIndex);

hotbar.UseItem(itemSlotIndex);

Similar to other Item View Slots Containers, the component is initialized by a panel binding which also sets the inventory to monitor.

 

Item Actions

Item Actions can be used to assign and unassign items from the hotbar.

AssignHotbarItemAction

This itme action allow you to Assign (or Toggle Assign/Unassign) items to the ItemHotbar UI component.
The itemAction opens up a panel with options to set the item in the hotbar.

UnAssignHotbarItemAction

Unassign an Item from the hotbar without removing it from the Inventory (Can only be used from the ItemHotbar)

ItemViewDropContainerRemoveAction

An ItemViewDrop action that removes the item from the hotbar