Choose a hotbar by deciding what each visible slot represents. A quick-use slot can monitor a Health Potion that remains in Bag, mirror an Inventory Grid entry, hold a Fire Wand in a dedicated Item Collection, or expose a project-specific Item workflow.

Released Ultimate Inventory System Version 1 supplies two choices in UI Designer > Hotbar, an Equipment-style alternative in UI Designer > Equipment, and base components for a custom implementation.

Compare the hotbar patterns

Pattern What the slot owns Best fit What changes when the player assigns an Item
Item Hotbar A monitored ItemInfo assignment Health Potion stays in Bag while a numbered key uses it. Only the hotbar assignment changes. The Item does not move between collections.
Inventory Mirror Hotbar A view of consecutive filtered and sorted Inventory Grid entries The first few Inventory Grid entries should always be the quick bar. The underlying Inventory Grid changes; the hotbar redraws from that grid.
Item Slot Collection View An Item in a dedicated Item Slot Collection Fire Wand must occupy a Weapon, Equipment, loadout, or other fixed slot. The Item moves into the configured Item Collection.
Custom container Whatever ownership rule the project implements An ability-style bar or another rule that the three supplied patterns do not express. The custom ItemViewSlotsContainerBase subclass decides.

The supplied Hotbar creator builds only Item Hotbar and Inventory Mirror Hotbar. Use the Equipment creator for an Item Slot Collection View. A custom container must be added and configured manually.

Before you begin

Prepare one small comparison fixture:

  • a player Inventory with a Bag collection;
  • Health Potion and Fire Wand Items with working Item Actions;
  • an Inventory Grid bound to Bag;
  • a UI Designer canvas created from a duplicated schema;
  • an IPlayerInput implementation for the owning player; and
  • an Inventory saver if Items must survive save and load.

Test both Item Actions from the Inventory UI first. This separates an Item Action or Item User problem from a hotbar ownership, binding, or input problem.

The supplied Feature Demo scenes also show the patterns independently: 6 Hotbar, 6_1 Inventory Mirror Hotbar, 6_2 Shared Inventory With Mirror Hotbar, and 6_3 Hotbar Unassign slot.

Create a monitored Item Hotbar

Use this pattern when the player chooses quick-access assignments but the Items should remain in Bag.

  1. Open Tools > Opsive > Ultimate Inventory System > UI Designer and select Hotbar.
  2. Set Number of Slots. The creator defaults to 3.
  3. Keep Hotbar Type set to Item Hotbar, the creator default.
  4. Create the panel and confirm that its panel binding resolves the intended player’s Inventory.
  5. In Hotbar Options, add or remove Item View Slots and keep their hierarchy order aligned with the intended input indexes.
  6. Assign Health Potion or Fire Wand with AssignHotbarItemAction or the supplied smart drag-and-drop path.

The Item Hotbar monitors the assigned ItemStack. Its amount refreshes from the bound Inventory, but assigning or clearing the slot does not transfer the Item. Remove Item If Amount Is 0 is off by default; enable it when a monitored slot should clear after no matching Item remains.

The generated Item Hotbar Handler uses Hotbar Input entries for indexes 0 through 9. The supplied entries are Equip First Item through Equip Tenth Item, all using Button Down. Each input invokes the configured Item Actions Binding for its zero-based slot.

Create an Inventory Mirror Hotbar

Use this pattern when the quick bar should always show a slice of an Inventory Grid rather than store independent assignments.

  1. In UI Designer > Hotbar, set Hotbar Type to Inventory Mirror Hotbar.
  2. Set Number of Slots and create the panel.
  3. On Inventory Mirror Hotbar, assign Inventory Grid To Mirror. The component requires this reference even when an ID is also used.
  4. Keep Inventory Grid ID To Mirror at its default 0, or set it to the shared grid ID that should trigger updates.
  5. Set Start Index. Its default 0 displays the first filtered and sorted entry in the first hotbar slot.
  6. Enable Prevent Move To Grid or Prevent Move From Grid only when drag-and-drop should be one-way.

The mirror calls the Inventory Grid’s filter and sorter, then displays one consecutive entry per visible slot. Moving, adding, removing, or unassigning through the mirror is forwarded to the Inventory Grid. The display continues to respond to matching Inventory Grid updates even while the grid panel is closed.

This pattern is order-dependent. A sorter, filter, grid ID, or Start Index change can make a different Item appear under the same numbered input without creating a new hotbar assignment.

Create a collection-backed hotbar

Use an Item Slot Collection View when a quick slot must own an Item. This is the same runtime view used for Equipment, but its Item Collection can be a project-specific collection such as Hotbar Collection.

  1. Create an Item Slot Set with one entry for each quick slot. Use narrow categories where the slot is meaningful, such as Consumable for Health Potion or Weapon for Fire Wand.
  2. Add an Item Slot Collection to the player Inventory and assign that Item Slot Set.
  3. Open UI Designer > Equipment and choose the same Item Slot Set. The creator requires a set from the current database.
  4. Create the Item Slot Collection View, then set Item Collection ID to the new collection rather than the default Equipped purpose.
  5. Confirm that Set Item View Slot Restrictions and Add View Slot Category Restrictions produce the intended category rule for every visible slot.
  6. Add an Item Actions Binding for the action that each slot should invoke.
  7. Add Item View Slot Container Indexed Actions Handler and assign Item View Slots Container, Item Actions Binding, and the Input entries.

The indexed handler defaults to the same ten Equip First Item through Equip Tenth Item inputs using Button Down. Unlike Item Hotbar Handler, it looks for IPlayerInput on the bound Inventory GameObject itself, so assign references explicitly when the input component lives elsewhere.

Dragging Health Potion or Fire Wand into this view moves the Item into its Item Slot Collection. Clearing a slot must move or remove the Item according to the configured Item Action or drag-and-drop action; UnAssignHotbarItemAction is only for Item Hotbar assignments.

An Item Slot Collection View does not automatically equip a character model or apply game-specific effects. An Equipper or the project’s own Item logic handles those results.

Build an ability-style or custom hotbar

Use a custom container only when the ownership rule cannot be represented by monitored Items, a grid slice, or an Item Slot Collection. For example, a project that represents abilities as Items might display a Fire Wand action beside non-Inventory commands while keeping one shared indexed-input row.

Derive the runtime container from ItemViewSlotsContainerBase, then define how it gets, adds, removes, and moves its entries. Reuse the Item View Drawer, Item View Slots, Item Actions Binding, drag-and-drop actions, and container events where their Item semantics still apply. Add Item View Slot Container Indexed Actions Handler when each visual index should trigger an Item Action, or implement project-specific input when a slot is not an Item.

Do not use a custom container merely to change colors, spacing, icons, or slot count. Those are view and UI Designer concerns, not new ownership behavior.

Compare actions and amount refresh

Pattern Indexed action path Amount and icon refresh
Item Hotbar Item Hotbar Handler calls UseItem(index), which delegates to the Item Actions Binding. Redraw checks the monitored Item in its original collection, then elsewhere in the same Inventory.
Inventory Mirror Hotbar Uses the inherited Item Hotbar Handler and action binding. Redraw reads the current filtered and sorted Inventory Grid slice.
Item Slot Collection View Item View Slot Container Indexed Actions Handler triggers its assigned Item Actions Binding. Redraw reads each index from the Item Slot Collection.
Custom container Use the indexed handler only for Item-backed slots; otherwise supply custom input. The custom container must define a deterministic source and redraw rule.

Pointer click or UI submit behavior comes from the Item Actions Binding, not from the visual slot alone. Keep the same action index, Item User, and category action set when comparing keyboard, controller, and pointer results.

Choose persistence and player ownership

Pattern State to save Released Version 1 approach
Item Hotbar Slot-to-ItemStack assignments, plus Inventory contents Add Item View Slots Container Saver to the hotbar and keep the normal Inventory saver. Restore Inventory ItemStacks before the slot mapping.
Inventory Mirror Hotbar Inventory contents and, when required, the Inventory Grid’s index data The mirror has no independent assignment mapping. Save the Inventory and the grid/index data used to derive its order.
Item Slot Collection View Items and indexes inside the Item Slot Collection Inventory Saver preserves Item Slot Collection entries by slot. The view redraws from that collection.
Custom container The state defined by the custom ownership rule Reuse Item View Slots Container Saver only when an ItemStack-to-index mapping completely describes that state; otherwise provide a matching saver.

For local multiplayer, give each player a separate panel owner, Inventory, input route, Display Panel Manager, and saver key. A shared Inventory Mirror Hotbar can intentionally point at common Inventory Grid index data, but player-specific hotbars should not resolve another player’s grid or input.

Released Version 1 does not replicate hotbar assignments or custom slot state over a network. Synchronize authoritative state and action requests in the project’s networking layer. A mirror or collection-backed view can redraw from synchronized Inventory data, but that does not make its UI input authoritative.

Editor checkpoint

Before entering Play Mode, confirm that:

  • the selected pattern matches the intended ownership rule;
  • every panel binding resolves the correct player’s Inventory;
  • slot hierarchy order, visible count, and zero-based input indexes match;
  • Item Actions Binding, Item User, Category Item Action Set, and Item View Drawer references are valid;
  • an Inventory Mirror Hotbar has Inventory Grid To Mirror, the intended grid ID, and the intended Start Index;
  • an Item Slot Collection View and its destination collection use the same Item Slot Set;
  • the indexed handler can resolve IPlayerInput from the bound Inventory GameObject;
  • drag-and-drop changes only the assignment, grid, or collection intended by the selected pattern; and
  • the saver setup covers the pattern’s actual state rather than only its visible slots.

Verify in Play Mode

  1. Assign Health Potion from Bag to an Item Hotbar slot. Confirm that the Item stays in Bag, the amount refreshes, and the numbered input invokes its action once.
  2. Put Health Potion and Fire Wand in the mirrored Inventory Grid. Change the grid’s sort or order and confirm that the mirror follows it, including while the Inventory Grid panel is closed.
  3. Drag Fire Wand into a Weapon slot in the collection-backed hotbar. Confirm that it leaves Bag, enters the configured Item Slot Collection, and the indexed input invokes the intended action.
  4. Try Health Potion in the Weapon slot and confirm that the category restriction rejects it without losing the Item.
  5. For an Item-backed custom or ability-style slot, confirm that the indexed input uses the intended Item Action and that a non-Item command follows its separate input path.
  6. Disable gameplay input for the owning player and confirm that both supplied indexed handlers stop, then resume when gameplay input is enabled.
  7. Save, change every hotbar, and load. Confirm that monitored assignments, mirrored order, and collection-backed Items each restore from their own source of truth.
  8. Repeat with a second local player and confirm that neither player’s inputs, panel bindings, nor saver keys affect the other hotbar.

Troubleshooting

Symptom Check Fix
Assigning an Item unexpectedly removes it from Bag Selected hotbar pattern and drag-and-drop action Use Item Hotbar for monitoring; use Item Slot Collection View only when ownership should move.
The mirror is empty or logs that a grid is required Inventory Grid To Mirror Assign the actual Inventory Grid; the ID alone is not a replacement for the reference.
The mirror shows the wrong Items Grid filter, sorter, ID, Start Index, and slot count Make the mirror point at the intended ordered slice and retest after the grid redraws.
Dragging between the mirror and grid is blocked Prevent Move To Grid and Prevent Move From Grid Disable the direction guard that should remain interactive.
The collection-backed hotbar stays empty Item Collection ID, collection type, and Item Slot Set Resolve an Item Slot Collection and use the same set on the collection and view.
Fire Wand is rejected from its slot Item Category and Item Slot Set restriction Make Fire Wand a member of the accepted category or choose the correct slot category.
A numbered key does nothing Handler reference, input name/type, zero-based index, IPlayerInput, and gameplay-input state Bind the intended handler and action binding, correct the input index, and place or explicitly resolve the player’s input component.
Clicking works but a key invokes a different action Item Actions Binding and action index Use the same category action set and intended action index for both paths.
Item Hotbar assignments disappear after load Item View Slots Container Saver, Inventory saver, load order, and saver keys Save both Inventory and assignments, restore Items first, and make every player’s Full Key unique.
A mirror restores different slots Inventory Grid sorting/index data and its saver Persist the source order when it is not derived deterministically from current Inventory data.
Player two controls player one’s hotbar Panel owner, Inventory, manager, handler, and input ownership Give each player an isolated binding and input route.

Developer reference

ItemHotbar provides monitored assignments and UseItem. InventoryMirrorHotbar overrides refresh and transfer operations so they act on its required InventoryGrid. ItemSlotCollectionView maps each visual index to an ItemSlotCollection entry and validates the shared ItemSlotSet. ItemViewSlotContainerIndexedActionsHandler can trigger an Item Actions Binding by visual index for collection-backed or custom Item containers.

All four patterns can reuse the bind/unbind, selection, click, pointer, draw, and reset events exposed by the Item View Slots Container base classes. Version 1 does not publish a dedicated Item Hotbar assignment-changed event. Inventory Mirror Hotbar listens for the Inventory Grid update event, while both supplied indexed handlers listen for the character gameplay-input enable event.