How to Make an Inventory System in UE5 Blueprints
An inventory is really three things wearing one name: a data model (what an item is), a container (what you’re holding), and a UI that mirrors the container. Blueprints handle all three — the trick is keeping them separate so each stays simple.
What it’s made of
Variables
An Item struct (name, icon, stack count, max stack — or a Data Table row handle so item definitions live in a table), and an array of that struct as the inventory itself, usually on a component so any actor can carry one.
Events
AddItem and RemoveItem as functions on the inventory component, an OnInventoryChanged Event Dispatcher the UI listens to, and an Interact input (or overlap) on pickup actors that calls AddItem then destroys the pickup.
The logic
AddItem: loop the array with ForEachLoop looking for a matching, non-full stack — if found, write the increased count back with Set Array Elem at that index (the loop’s element pin is a copy for struct arrays, so editing it does nothing); otherwise Add a new entry (Branch on a capacity check first). Fire OnInventoryChanged after any mutation; the widget rebuilds its grid from the array rather than tracking changes itself.
Key nodes you’ll wire
The mistake that breaks it
Building the logic inside the UI widget. The inventory must live on a component/actor — widgets get created and destroyed, and an inventory that dies with its window is a bug factory.
New to how Blueprint systems fit together? Read the anatomy of a Blueprint system first.
Or skip the wiring — generate it
BlueprintStudio builds this system from a plain-language prompt — the right nodes, exec and data pins wired, defaults set, and the graph compiled to catch errors — then applies it into your open UE5 editor. The prompt is prefilled:
Build “Inventory System” in BlueprintStudioPrompt variations to try
Applying into your editor happens through the free Cosindra desktop app (Windows & macOS).