Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Augmented Reality Game Development

You're reading from   Augmented Reality Game Development Create your own augmented reality games from scratch with Unity 5

Arrow left icon
Product type Paperback
Published in Jan 2017
Publisher Packt
ISBN-13 9781787122888
Length 334 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Micheal Lanham Micheal Lanham
Author Profile Icon Micheal Lanham
Micheal Lanham
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started 2. Mapping the Player's Location FREE CHAPTER 3. Making the Avatar 4. Spawning the Catch 5. Catching the Prey in AR 6. Storing the Catch 7. Creating the AR World 8. Interacting with an AR World 9. Finishing the Game 10. Troubleshooting

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:

  1. 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 the Panel. Expand the Button object and then select the child Text object and press delete to remove it.
  2. Select the new Button object and rename it ExitButton in the Inspector window.
  3. 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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image