Unity Inventory Scripts

2 free C# scripts 2 beginner Unity 2022.3+ MIT licensed

Two small scripts for getting items into a prototype. Pickup / Collectible makes any object collectable, with a bobbing animation, rotation, an optional magnet pull and events when it is picked up. Simple Inventory stores what was collected in a list you can add to, remove from and query, without any UI.

When you need slots, stacking, drag and drop and saving, use the Complete Inventory System kit instead. It is listed below under the kits that build on these scripts.

Start with Simple Inventory

Lightweight list-based inventory for prototypes. Add, remove, and check items without UI complexity.

SimpleInventory.cs · 8 Inspector fields · beginner

Open Simple Inventory
SimpleInventory.cs
Script SimpleInventory
Item Id
Quantity 0
Settings
Max Slots 20
Max Stack Size 99
Events
On Inventory Changed ()
List is Empty
On Item Added (string, int)
List is Empty
On Item Removed (string, int)
List is Empty
Items ItemEntry · Size 0

All 2 inventory scripts

Kits that build on them

Guides that use them