How to Build an Inventory System in Blueprints (A Simple Structure That Scales)

Table of Contents

Works in Unreal Engine 5.0 to 5.8. Updated November 2026.

Quick answer: split the inventory into three parts.

  1. Item data (name, icon, mesh, max stack) goes in a Data Table, one row per item.
  2. What the player holds is an array of a small struct: the item’s row name plus a quantity.
  3. That array lives in an Actor Component (for example AC_Inventory) that you add to the player, chests and shops.
  4. To save, store only the array of names and quantities. Look up icons and meshes from the Data Table again when you load.

Struct, Data Table or Data Asset?

These aren’t competitors. They do different jobs:

UseForWhy
StructureThe shape of the data: an item’s info, or one inventory slotGroups variables together. You need one either way.
Data TableThe list of all itemsOne spreadsheet-like asset, easy to edit and import from CSV. Good default for beginners.
Data AssetOne asset per itemHandy when items differ a lot or several people edit items at once.

Big games: use soft references. A Data Table loads every asset its rows point to. With hundreds of items, make the icon and mesh fields Soft Object References and load them when needed.

Step 1: Make the two structs

In the Content Browser, click + Add > Blueprint > Structure twice.

  • S_ItemInfo: DisplayName (Text), Icon (Texture 2D), Mesh (Static Mesh), MaxStack (Integer).
  • S_InventorySlot: ItemID (Name) and Quantity (Integer). Add per-item values that change in play, such as Durability, here too.

Then click + Add > Miscellaneous > Data Table, pick S_ItemInfo as the row structure, and add a row per item. The row name (for example Potion) is the ItemID.

Step 2: Make the inventory component

  1. Click + Add > Blueprint Class, choose Actor Component and name it AC_Inventory.
  2. Add a variable Slots, type S_InventorySlot, set to Array.
  3. Add functions AddItem (ItemID, Amount), RemoveItem and HasItem. Put all inventory logic here, not in the character.
  4. Add an Event Dispatcher OnInventoryChanged and call it at the end of AddItem and RemoveItem, so the UI refreshes only when something changes.
  5. Open your character and click + Add in the Components panel to add AC_Inventory.

Other Blueprints reach it with Get Component by Class. You don’t need a cast or an interface just to find the inventory.

Where should the inventory live?

  • Single-player: on the Character is fine.
  • Multiplayer, or the items must survive death and respawn: on the Player State, which isn’t destroyed when the pawn is.
  • Chests, shops, enemies: give them the same AC_Inventory.

Set Members in Struct, explained

Set members in S_InventorySlot changes only the fields you choose and leaves the rest alone. Select the node and tick the fields you want in the Details panel to get their pins.

It edits whatever struct you plug in, directly. Plug in a variable and the variable changes; you don’t need to set it back afterwards.

It seems to “do nothing” when you plug in a copy:

  • Get (a copy) from an array. Use Get (a ref) instead (right-click the node > Change to return a reference).
  • The Array Element of a For Each Loop. Use the Array Index with Get (a ref), or write the changed copy back with Set Array Elem.
  • A function input. Tick Pass-by-Reference on that input, or return the changed struct.

For stacking in AddItem: loop over Slots, find the slot whose ItemID matches, Get (a ref) at that index and Set members with Quantity + Amount. If none matches, Add a new slot.

FAQ

Should each item be an Actor?

Only while it’s in the world. In the inventory, keep it as data (ID and quantity) and spawn the Actor when the player drops or equips it.

How do I save the inventory?

Copy the Slots array into your SaveGame object. It’s only names and numbers.

Do I need an interface?

Not to find the inventory. Use one when different actors must react to the same call in their own way.

Related articles