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

  • create a new project in Unity 2019.4.19f1
  • import TDE v1.10.1
  • open the Suspenders prefab
  • in its CharacterInventory, set AutoPick items to 3 : handgun ammo 10, assault rifle 1, assault rifle ammo 10
  • in AutoEquipWeaponOnStart, drag the Handgun
  • 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