The Inventory System package was heavily refactored in the 1.5.x architecture shift.
It now follows a more modular runtime layout and is designed to work well with the Data package and CatalogKey-driven authoring patterns.
What This System Solves
- defining items and item instances
- moving items between inventories/slots
- building UI views (inventory, equipment, tooltips)
- composing item behavior (equip, consume, stat preview, etc.) via features
Key Ideas
- Data-first definitions: item “definitions” are authored as data (good for JSON, remote content, versioning).
- Key-based asset lookup: fields like icons can be stored as keys (e.g.
CatalogKey) while still showing rich inspector previews.
- Feature composition: items gain gameplay capabilities by attaching feature modules, instead of relying on deep inheritance trees.
Suggested Mental Model
- Definition: “what this item type is” (static data)
- Instance: “a concrete owned item” (runtime state like stack count, durability, rolled stats)
- Slot: “a location that can hold an item” (inventory slot, equipment slot, hotbar slot)
- Feature: “optional behavior attached to a definition/instance” (equipable, consumable, stat provider, etc.)
Package Layout (Common Areas)
Runtime/Item/Core: definitions, references, item databases
Runtime/Item/Features: feature modules (compose behavior)
Runtime/Item/Slot: slot controllers, visuals, tooltip builders
Runtime/UI: inventory/equipment UI controllers and views
Runtime/ItemStats: stat line data and controllers (UI-friendly formatting)
Runtime/DropTable: weighted drop sources and roll helpers
Integration Points
- Data Package: makes “definitions as data” practical (default vs actual workflows, JSON tools).
- Data Catalogs + CatalogKey: decouple definitions from direct Unity asset references while keeping authoring comfortable.
- RPGStats (optional): when you want item features to drive stat deltas, comparisons, and equipment rules.
What Changed in 1.5.0 (High-Level)
- inventory became more modular (separated responsibilities and assemblies)
- moved toward feature-driven item behavior
- stronger emphasis on key-based references and data-driven definitions
Related Pages