Skip to main content
Back to projects

Adaptive Inventory

In Progress

Native UE5 inventory system with MVVM architecture

A learning project exploring performance-optimized UI systems in Unreal Engine 5, built with C++ and Blueprints. Focus on clean architecture, event-driven updates, and Epic's recommended UMG patterns.

Adaptive Inventory screenshot

The Problem

Most inventory tutorials teach tightly-coupled approaches that don't scale. Coming from web-based game UI (Coherent Gameface), I wanted to understand how native UE5 UMG systems work and learn Epic's recommended patterns for production-quality game UI.

The Solution

Building a three-layer MVVM architecture: Data (UInventoryItemData), Business Logic (UInventoryManagerSubsystem), and Presentation (UMG widgets). Using delegates for event-driven updates so UI only refreshes when data actually changes - no tick-based polling.

Key Features

  • Event-driven architecture with delegates (no per-frame checks)
  • Smart auto-stacking with overflow handling
  • GameInstanceSubsystem for persistence across level loads
  • Blueprint-exposed API via UFUNCTION/UPROPERTY
  • Widget base class with automatic event binding/cleanup
  • Filtering by category, rarity, or partial name match

Challenges & Solutions

Auto-stacking overflow

Adding 80 items to a stack of 50 (max 99) needed to fill the first stack and create a new one with remainder.

How I solved it:

Items distribute across all partial stacks before creating new slots. System splits automatically when stacks fill up.

Items not stacking

Created two 'Health Potions' but they wouldn't combine into one stack.

How I solved it:

Item names are case-sensitive in C++! Also need to match category. String comparison requires exact matches.

Subsystem not showing in Blueprint

Couldn't find the inventory subsystem when searching in Blueprint graphs.

How I solved it:

Blueprint reflection requires editor restart after C++ changes. Compile C++ then restart editor.

What I Learned

  • MVVM pattern transfers from React/web to game engines - same architecture, different automation level
  • Subsystems handle their own lifecycle, eliminating manual setup boilerplate
  • Forward declarations sufficient for pointer types - only include headers when calling methods
  • Event-driven UI is how Fortnite works - scales to complex UIs without performance hits

Tech Stack

  • Unreal Engine 5
  • C++
  • Blueprints
  • Slate
  • UMG