O'Reilly logo

Unity Game Development Scripting by Kyle D'Aoust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Inventory

In this chapter, we will create an inventory storage system. We'll also create a GUI representation of the inventory for the player to interact with, as well as showing the player their quick items. Items that can be quickly used or equipped using easy access keys are known as quick items; they are used frequently in RPG and FPS games. Inventories are used in many games from all genres, so having a good way to make one is very helpful.

In this chapter, we will cover the following topics:

  • Creating a storage system for GameObjects
  • Adding items to the inventory
  • Removing items from the inventory
  • Initializing the inventory
  • Setting the inventory size to be dynamic
  • Making it possible to have multiples of items
  • Setting quick items that can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required