Skip to Content
Augmented Reality for Developers
book

Augmented Reality for Developers

by Jonathan Linowes, Krystian Babilinski
October 2017
Intermediate to advanced
548 pages
13h 23m
English
Packt Publishing
Content preview from Augmented Reality for Developers

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 its article we don't want that to break this book.

The image name is the fourth column in your database (index 3). We can capture it when the file is loaded.

To InstructionStep.cs, add the following:

    public string ImageName;     private const int ImageColumn = 3; 

And then add this to the InstructionStep constructor function:

            if (values.IndexOf(item) == ImageColumn) { 
                ImageName = item; 
            } 

Now we create a UI element component. In your Scripts/UIElements/ folder, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Augmented Reality Game Development

Augmented Reality Game Development

Micheal Lanham
Augmented Reality

Augmented Reality

Joseph Rampolla, Greg Kipper

Publisher Resources

ISBN: 9781787286436Supplemental Content