Import
Import ModularInventoryPro under Assets and wait for Unity to finish compiling.
Setup, items, UI, containers, equipment, crafting, loot, weight and scene persistence. Everything required to integrate the asset into a Unity project.
FIRST STEPS
Import ModularInventoryPro under Assets and wait for Unity to finish compiling.
Open Demo/Scenes/DemoScene and enter Play mode.
Collect, equip, drop, sort and transfer items between the player and containers.
SETUP
Tools → ModularInventoryPro → Inventory Designer.MANUAL SETUP
InventorySystem to the player.InventoryUIManager.DATA
Every item is an ItemDefinition shared by pickups, recipes, loot tables, equipment and inventories.
ConsumeActionRemoves one unit. Heal Amount is sample data; connect your own health system to apply healing.EquipActionFinds an Equipment Manager on the inventory GameObject and equips into Target Slot ID.DropActionRemoves one logical unit. Instantiate Model Prefab yourself for a physical drop, or use Demo Hand Equip.USER EXPERIENCE
Move, swap and merge stacks, including across inventories.
Shift + click moves half to the first free slot.
Right-click exposes valid item actions.
Name, description, rarity, stats, weight and value.
Create Assets → Create → ModularInventoryPro → UI Theme. Configure colors, slot size, spacing, padding, sprites and fonts, or call:
uiManager.SetTheme(myTheme);
STORAGE
DemoChest to the root.MODULAR SYSTEM
Add Equipment Manager on the inventory GameObject. Create slot definitions with unique IDs and matching Equip Actions. Accepted Category filters slots. Override GetModifiersFromItem for game-specific stats.
Recipes define ingredients, results, time and optional station type. Station Type must exactly match Required Station Type. Use instant or timed crafting and listen for started, completed and failed events.
Weights are relative probabilities. Configure drop count, quantity range, duplicates and minimum level. Loot Dropper can spawn a prefab or add directly to an inventory.
Weight Config defines capacity, overweight permission, warning threshold and speed multiplier. The provider exposes current, remaining, ratio, near-capacity and overweight values.
INSPECTOR
ADAPTATION
Edit Slot Count and Grid Columns. At runtime call Resize, then refresh an already-built UI.
Edit keys and movement on Demo Player Controller. For the new Input System, replace input reading while keeping the public inventory calls.
Duplicate DefaultTheme and edit colors, sizes, spacing, sprites and font.
Use Inventory Panel Style. A custom slot prefab must keep Slot UI and wire its visual references.
Assign Model Prefab. Adjust held and dropped target sizes for unusual source scales.
Replace visual children, preserve Demo Chest and Collider. Assign a render-pipeline-compatible material.
Create a Collider + Demo Pickup, then assign definition, quantity and optional bob/rotation.
Container titles use GameObject names. Replace Demo Player Controller and Demo Chest helper strings with your localization keys.
Inherit Item Action, implement Execute and optional Can Execute, then add the action asset to a definition.
Read Get Slots, call public operations and listen to events. The runtime does not require the demo UI.
The core does not require Demo Player Controller. Use your own raycast or interaction system.
Implement I Inventory Provider for grid, class, filter or other rules and register it through Set Provider.
PERSISTENCE
Saved data includes slot index, Item ID, quantity, instance data, durability and Custom Data. Missing Item IDs are skipped with a warning.
saveManager.Save();
saveManager.Load();
saveManager.PersistBetweenScenes = true;
saveManager.ClearSessionData();
saveManager.DeleteSave();
string json = saveManager.SaveToString();
saveManager.LoadFromString(json);
public class MySerializer : IInventorySerializer
{
public string Serialize(InventorySaveData data) { /* ... */ }
public InventorySaveData Deserialize(string json) { /* ... */ }
}
saveManager.Serializer = new MySerializer();
INTEGRATION
Subscribe in code or add InventoryEventRelay to wire UnityEvents in the Inspector.
InventoryEvents.OnItemAdded += (item, qty) => { };
InventoryEvents.OnItemRemoved += (item, qty) => { };
InventoryEvents.OnItemMoved += (item, from, to) => { };
InventoryEvents.OnInventoryFull += inventory => { };
InventoryEvents.OnItemUsed += item => { };
QUICK REFERENCE
AddItem(definition, qty)Add and return accepted quantity.AddItemInstance(instance, qty)Add an existing instance.RemoveItem(definition, qty)Remove matching units.RemoveItemAtSlot(index, qty)Remove from one slot.MoveItem(from, to)Move, merge or swap.SplitStack(slot, amount)Split a stack.UseItem(slot)Execute the first valid action.HasItem / GetItemCount / FindItemQuery inventory content.Sort / Clear / ResizeManage structure.EquipmentManager.Equip / UnequipChange equipped instances.GetTotalStat(name)Calculate a final stat.CraftingSystem.CanCraftValidate ingredients.CraftInstant / CraftTimedRun a recipe.ItemDatabase.GetItemByIdResolve definitions.InventoryUIManager.SetInventoryBind another inventory.EXTENSION
[CreateAssetMenu(menuName = "MyGame/Actions/Teleport")]
public class TeleportAction : ItemAction
{
public Vector3 destination;
public override void Execute(ItemInstance item, InventorySystem inventory)
=> inventory.transform.position = destination;
}
inventorySystem.SetProvider(new MyCustomProvider());
instance.SetCustomData("quality", "masterwork");
string quality = instance.GetCustomData("quality", "normal");
MAINTENANCE
HELP
Assign a material and shader compatible with Built-in or URP. Check every Mesh Renderer after replacing prefab visuals.
Check Collider, interaction range, layer mask and that Demo Chest is on the Collider object or one of its parents.
Check Inventory, Slot Prefab, Slot Container and that Item Database contains the definitions.
Enable persistence, use the same Save Key and assign Inventory and Database in both scenes.
Do not use one Save Key for unrelated inventories. Clear session data for a new game.
Add an EventSystem and Graphic Raycaster. Make sure no graphic blocks slot raycasts.