-
Notifications
You must be signed in to change notification settings - Fork 7
Using the Inventory
In this example, I am using the "FindTheStonesAR_Inventory" scene, where an Inventory system has been added to the existing AR game as an example.
For this example game, I want the guide at the start to give you 6 Googley Eyes that you then can put on the stones to make them "come alive" and talk to you. To start, a new BaseItem needs to be created so the inventory system can see it. To do this, you can copy an existing item and then modify it to your needs. There are a number of example items:

You can take the coin file, copy it somewhere in your project, and start modifying it in the inspector. This is what the end result is:

As I already had the "Googley Eyes" game object, all I needed to do is create a sprite to show in the inventory, and dragged the already created prefab in there.
All I need to do now is add 6 Googley Eyes in the inventory of the player, and I do that in the "Converge" Node:

For this example, I want there to be a pickable key somewhere in the map, and a chest that the player can unlock to get a reward. To do this, I am using the "LocationPickups" order, which lets me give it a location and an item to pick up, and it will show up on the map for the player to go to. I added a "DroppedKey" location, and then just added this to the node:
