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

Adding image content


Given our InstructionElement events, to add images to the instructions requires updates to the UI and the data model, but not the controller.

Adding an image to the instruction Content panel

First let's add an image to the Content panel. Actually, we will add a Unity UI Raw Image, since the element named Image is reserved for sprites.

  1. In Hierarchy, locate the Content panel (under Main Canvas), right-click, and select UI | Raw Image.
  2. Rename it Image Graphic.
  3. Select Add Component | Layout Element.
  4. Select Preferred Width: 395.
  5. Select Preferred Height: 250.
  6. Position it in the Hierarchy between Title Text and Body Text.

The image ahead shows the now current Hierarchy, along with the Scene view of the Canvas:

Adding image data to the InstructionStep model

From our CSV data, images will be referenced by name. The app will look in the Resources folder for the files. We could use an image URL instead (and that is provided as another column in the CSV data), but, just in case wikiHow changes...

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