📺 Watch the Full Video Tutorial on YouTube
In this step-by-step tutorial, you’ll learn how to create a fully functional, clean, and expandable inventory system in Unreal Engine 5 using Blueprints, Blueprint Interfaces, and UMG Widgets.
This system is suitable for a wide variety of games — from third-person RPGs to survival and top-down simulations. Whether you’re a beginner or intermediate developer, this guide will give you a robust base to expand upon.
🎮 What You’ll Build
- An inventory system built with modular Actor Components and Blueprint Structs
- Auto-pickup logic that integrates seamlessly into the Third Person Character
- A clean and responsive UI Inventory Panel using UMG
- Dynamic item widgets that display item icons and names
- Full add, remove, and drop functionality
- Inventory toggle key with cursor support and screen logic
📁 Project Setup
We start with the Third Person Template in UE5.
Step 1: Create the Inventory Structure
- Name:
InventoryItemStruct
- Fields:
ItemName
(Text)ItemID
(Integer)ItemIcon
(Texture2D)Quantity
(Integer)
This struct defines how we represent items in our system.
Step 2: Build the Inventory Component
Create a new Actor Component called InventoryComponent
.
Add a variable called InventoryItems
as an array of InventoryItemStruct.
This component will handle all item storage and logic.
Step 3: Add Item Functionality
Create a function called AddItem
that:
- Checks for existing items by
ItemID
- If found, stacks the item quantities
- If not found, adds it to the inventory array
This logic is clean, optimized, and ready for expansion with stacking, rarity, or weight systems.
Step 4: Remove Item Functionality
The RemoveItem
function allows removing items by ItemID
.
- Iterates the inventory
- If match is found, removes it by index
🔗 Creating Modular Item Interaction
Step 5: Create the Blueprint Interface
Name it BPI_InventoryInteract
.
Add two functions:
Get Item Data
— returns the item’s structOn Collected
— triggers cleanup logic like Destroy Actor
Step 6: Create Pickup Items
Create a new actor blueprint called BP_PickUpItem
.
- Add a static mesh and a sphere collider
- Assign the
BPI_InventoryInteract
interface - Set up editable exposed variable
ItemData
- Implements both interface functions
Step 7: Player Auto Pickup
Inside your BP_ThirdPersonCharacter
:
- Add the
InventoryComponent
- On
ActorBeginOverlap
, check for interface implementation - If valid:
- Get item data
- Add to inventory
- Call
On Collected
🖼️ Designing the UI
Step 8: Create Item Widget WBP_InventoryItem
- Canvas root
- Item Icon (Image)
- Drop Button
- On click, remove item from inventory
Step 9: Create Inventory Panel WBP_InventoryPanel
- Canvas with inner panel and uniform grid
- Close button
- Dynamic logic to populate items from
InventoryComponent
- Supports refresh with custom event
UpdateInventoryList
Step 10: Inventory Toggle with “I” Key
- Use FlipFlop node for opening and closing
- Show/hide widget, toggle cursor, and input mode
- Store widget in variable
InventoryWidget
for reuse
Step 11: Drop Logic & Final Polish
- Add drop logic inside item widget
- Refresh inventory panel after drop
- Set horizontal and vertical alignment to Fill
- Set background ZOrder to -5
📦 Test Items and Final Touches
- Download item icons from game-icons.net
- Add pickup actors in the level and assign:
- Mushroom
- Canned Fish
- Backpack
Run the game, collect items, open inventory, and test drop functionality.
🧠 What’s Next?
This system gives you a scalable foundation. You can now add:
- Equipment slots
- Stack limits
- Drag-and-drop
- Item effects
- Saving/loading inventory state
⏱️ Video Chapters
00:00 Intro — Expandable Inventory System with Blueprints and UMG
00:34 Creating the Inventory Item Struct
01:32 Setting Up the Inventory Component
02:55 Writing the Add Item Function (Stack Logic Included)
06:10 Creating the Remove Item Function
07:49 Making the Inventory Interface Modular
09:08 Building the Pick-Up Item Actor
10:39 Auto-Pickup Setup in the Player Blueprint
12:15 Creating the Inventory Item UI Widget
15:01 Main Inventory Panel UI — Design & Logic
20:32 Finalizing the Item Icon and UI Cleanup
21:03 Toggle Inventory with I Key — Full Setup
24:26 Drop Button Logic + UI Polish
25:31 Placing and Configuring Test Items in the Level
26:13 Final Test and Expansion Ideas
📺 Watch the Full Tutorial
▶️ How to Create Inventory System in Unreal Engine
Written by Rumbod
Visit Rambod.net