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

Item count modifications

Now that we have discussed the features of the inventory, we need to figure out how items in the inventory can be gained or lost. This can be done in the following ways:

  • Buying, selling, and trading items
  • Dropping and picking up items
  • Destroying or using items

Item bartering

If your game has a lot of items in its world, you might have included shops within that world. In these shops, the player can sell their items or buy more items. This method is very common in role-playing games, as these types of games have many items. Another way to barter items is to trade them. This can be done in offline games, but this is mostly seen in online games where players can use a menu system to trade their items.

Dropping and picking up items ...

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