Search icon CANCEL
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
HoloLens Beginner???s Guide

You're reading from   HoloLens Beginner???s Guide Join the AR revolution with HoloLens

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781786464729
Length 376 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jason M. Odom Jason M. Odom
Author Profile Icon Jason M. Odom
Jason M. Odom
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface Welcome to the New World FREE CHAPTER HoloWorld I am in Control User-Friendly Interface Now That Is How It Should Sound Not So Blank Spaces The Tools of the Trade Share What You Have Got Putting It All Together Fixing Problems

In-game menu


In this section, we will reinforce some of our previous lessons while we add something that we need to our project. We will also learn how to add debug messages to our new system here.

Remember when I had you hit the duplicate command in the last section? Well, that was step one for this section taken care of already.

Note

Always think ahead when you can; avoid getting painted into corners.

OK, so here we will make a few changes to our 3DTextPrefab to work as a menu button. Then, duplicate it one more time.

So, we will attach our buttons to the Skeeball machine. In order for the button to be clickable, we need to add a collider to it.

Creating the menu items

With the 3DTextPrefab selected in the Inspector, select Add Component and go to Physics 2D and select Box Collider 2D:

  1. Now, change the text of the TextMesh component to Start.
  2. Change the Name to StartBtn.
  3. Change the Character size to 4.
  4. Here is what yours might look like:
  1. Now, click on the Edit Collider button. You might notice an issue...
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 €18.99/month. Cancel anytime