InventoryCore


Complete framework-agnostic inventory for Unity 6: items, stacking, weight, equipment, crafting, persistence, drag-drop UI. Zero third-party deps. Pure data model.


by ZeroToGame


Price History +

Stop writing inventory from scratch on every project.


InventoryCore gives you a production-quality, framework-agnostic inventory system you can have running in minutes. Pure data model — no MonoBehaviour god-objects, no hard UI coupling, no hard save-system coupling. Bring your own UI, bring your own save system. The core just does inventory correctly.


ITEM SYSTEM

• ScriptableObject item definitions (icon, category, rarity, weight, stack size, custom data)

• Allocation-free ItemStack value type — safe in hot loops

• Stable GUID-based IDs — rename assets freely without breaking save data

• Open CustomData bag for game-specific extensions without subclassing


INVENTORY CONTAINERS

• Configurable capacity and weight limit

• Automatic partial-stack fill, overflow to next slot

• Per-slot lock and category filter

• Full CRUD operations with detailed result codes


CONSTRAINT SYSTEM

• Pluggable IInventoryConstraint interface

• Built-in weight, category, and quantity constraints

• AND/OR composite constraints with a fluent builder API

• Allocation-free in the common (no-violation) path


EQUIPMENT SYSTEM

• Named slots (MainHand, OffHand, Head, …) via ScriptableObject definitions

• Category filtering per slot

• Automatic swap-to-backpack when equipping over an occupied slot

• Stat provider bridge for any external stat system


CRAFTING BRIDGE

• Synchronous and async (UniTask or coroutine fallback) crafting

• Full atomic rollback — no half-crafted results

• ICraftingRequirement for station/skill gates

• Same-bag crafting supported


PERSISTENCE

• Single JSON blob for all containers — write it wherever you like

• Schema versioning with a migrator chain

• Survives item renaming (IDs are GUIDs)

• LoadReport describes every item/container that could not be restored


DRAG-AND-DROP UI (uGUI / Canvas)

• Inventory and equipment panel grids on a standard Canvas

• Ghost icon follows the pointer during drag

• Screen-edge-aware tooltip (icon, name, description, rarity, weight, custom data)

• Right-click context menu (split / drop / unequip)

• Panels build themselves in code — no prefab to wire, no UI Toolkit/TextMeshPro setup

• Multiple open panels simultaneously (bag + chest + equipment)

• Fully replaceable — the data layer has zero UI dependency


EDITOR TOOLING

• Custom ItemDefinition inspector with icon preview, validation, weight preview

• Auto-scanning ItemRegistry in the editor


REQUIREMENTS

• Unity 6000.0 LTS or newer

• No third-party packages required

• UniTask optional (for await-based async crafting)