This page describes how to add an inventory to your game.

The Inventory Engine

The TopDown Engine comes with the Inventory Engine, More Mountains’ complete and autonomous inventory solution. It also comes packed with 2 demo scenes and ready to use items, so you don’t have to worry about plugging one into the other, it’s already setup for you to use.

Jekyll
The Inventory Engine in action in the Loft demo scene

The Inventory Engine is designed to be simple yet flexible, and if you want to use it, it’s recommended that you read its dedicated documentation.

TopDown Engine specifics

There are a few additions included in the TopDown Engine to make using the Inventory Engine even more seamless, the most important being CharacterInventory : a Character Ability that will allow you to bind up to three inventories to your character. You just need to type their names into the main, weapon and hotbar inventories, and the rest is taken care of.

Creating a prefilled inventory

  1. in Unity 6000.0.23f1 (or higher), create a new project and import TopDown Engine v4.2 via the Package Manager
  2. open the Suspenders prefab
  3. in its CharacterInventory, set AutoPick items to 3 : handgun ammo 10, assault rifle 1, assault rifle ammo 10
  4. in AutoEquipWeaponOnStart, drag the Handgun
  5. open the Loft3D demo scene, press play, you now spawn with a handgun in hand, press T, you now have an assault rifle, press T again, now it’s a handgun, repeat as much as you want