Adding the menu buttons
In order to connect our scenes together, we need player input to trigger an event. We do have an event setup for when the player clicks on the monster in the Map scene. However, we also want the player to move from the Map/Catch scene to the Inventory scene and back. In order to do this, we will add some UI buttons to each of the scenes.
Since we already have the Inventory scene already open, let's begin by adding the new button to that scene:
- Right-click (press Ctrl and click, on a Mac) on the
InventoryBag
object in the Hierarchy window and select UI | Button from the context menu. This will add a button just below thePanel
. Expand theButton
object and then select the childText
object and press delete to remove it. - Select ...
Get Augmented Reality Game Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.