Interface-Based Architecture
Work with IItem interface everywhere. Zero overhead between Resources and POCS classes.
// Just a cast - no conversion!IItem item = itemDefinition;High-performance item & inventory management for Godot 4
Stack Inventory is a professionally crafted inventory system designed for Godot 4 C# projects, featuring interface-based architecture, zero-overhead performance, and comprehensive testing.
Interface-Based Architecture
Work with IItem interface everywhere. Zero overhead between Resources and POCS classes.
// Just a cast - no conversion!IItem item = itemDefinition;POCS Design
Plain Old C# Serializable objects for items. Perfect for saves, networking, and procedural generation.
var item = new Item(id, name, value, tags);// Serialize/deserialize with any libraryPerformance First
10-100x faster than string-based lookups. Direct property access with interface casts.
Tag System
Hierarchical tag system for powerful item categorization and filtering.
if (item.HasTag("Weapon.Melee")) { // Apply melee weapon logic}// In Godot Editor: Create ItemDefinition Resource// Or in code:var potion = new Item( id: Guid.NewGuid(), name: "Health Potion", value: 50f, tags: new List<ItemTag> { new("Consumable") }, stackMaximum: 99);public void HandleItem(IItem item){ GD.Print($"Name: {item.Name}"); GD.Print($"Value: {item.Value}"); GD.Print($"Can stack: {item.StackMaximum}");
if (item.HasTag("Consumable")) { UseConsumable(item); }}
// Works with BOTH ItemDefinition Resources AND Item POCS!HandleItem(itemDefinition); // Godot ResourceHandleItem(itemPOCS); // C# classItem Definitions
Create items as Godot Resources with visual editing in the Inspector.
POCS Support
Or use plain C# classes for runtime creation and serialization.
Pickup System
Built-in Pickup2D and Pickup3D nodes for world items.
Stack Management
Automatic stacking with configurable maximums per item.
Tags & Filters
Hierarchical tags for flexible item categorization.
Fully Tested
191 tests ensure reliability and catch regressions.
Getting Started
Install Stack Inventory and create your first item in 5 minutes.
API Reference
Browse the API docs for detailed interface and class documentation.
Migrate from 0.x
Follow the migration guide to upgrade existing projects.
Architecture
Learn the design behind Stack Inventory’s three-layer system.