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
Augmented Reality for Developers

You're reading from   Augmented Reality for Developers Build practical augmented reality applications with Unity, ARCore, ARKit, and Vuforia

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781787286436
Length 548 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Jonathan Linowes Jonathan Linowes
Author Profile Icon Jonathan Linowes
Jonathan Linowes
Krystian Babilinski Krystian Babilinski
Author Profile Icon Krystian Babilinski
Krystian Babilinski
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Augment Your World FREE CHAPTER 2. Setting Up Your System 3. Building Your App 4. Augmented Business Cards 5. AR Solar System 6. How to Change a Flat Tire 7. Augmenting the Instruction Manual 8. Room Decoration with AR 9. Poke the Ball Game

Switching between AR Mode


The first thing we'll do is provide an easy way for users to toggle views of the app between conventional 2D views to a 3D AR view by adding an AR Mode button on the bottom of the screen. We have decided a 50 pixel height, to be consistent with the nav bar at top.

Make room for it on the bottom by shortening the Content Scroll View:

  1. In Hierarchy, select the Content Scroll View (under Main Canvas).
  2. On its Rect Transform, set Bottom to 50.
  3. Now to add a new button to the Main Canvas; select it, go to UI | Button, and rename it AR Button.
  4. Set Height to 50.

 

  1. For Anchor Presets, set Bottom/Stretch and then also Alt+click the same to move it into position.
  2. Set Source Image to none and Color the same as the Nav Panel: 74, 182, 208, 255 (#4AB6D0FF).

The following screenshot shows us setting the Anchor Presets for the AR Button:

Next, edit its child text with the following values:

  1. Text: AR Mode.
  2. Font Size: 25.
  3. Color: White (#FFFFFFFF).

The new button should look something like this on...

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 AU $24.99/month. Cancel anytime