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 the new
Button
object and rename itExitButton
in the Inspector window. - From the Inspector window, set the Rect Transform | Anchor Presets to bottom-center while holding the pivot and position keys. Then, change the Rect Transform properties' Width...