This repository contains Unity project versions of the book for the following platforms and SDK:
- Vuforia 6.5
- Unity 2017.2
For other SDK implementations, check other Branches of this repository and visit https://github.com/ARUnityBook
The following book's AR projects are included as separate Unity scenes:
- Chapter 4 - Augmented Business Cards: Drone
- Chapter 5 - AR Solar System
- Chapter 6 - How to Change a Flat Tire
- Chapter 7 - Augmenting the Instruction Manual
- Chapter 8 - Room Decoration with AR: Photo Frames
- (Chapter 9 - Poke the Ball Game)
by Jonathan Linowes, Krystian Babilinski
Build exciting AR applications on mobile and wearable devices with Unity 3D, Vuforia, ARToolKit, Microsoft Mixed Reality HoloLens, Apple ARKit, and Google ARCore
Available at:
The implementation in this repository/branch is with Unity 2017.2 with integrated Vuforia 6.5. The primary difference between this and the instructions given in the book (Unity 2017.1 + Vuforia 6.2) is the prefabs are now replaced with integrated GameObjects.
Pg 42-44: Installing Unity: Download and Install
Install Unity 2017.2 or later, including the Vuforia components. Be sure to check the "Vuforia Augmented Reality Support" in Download Assistant.
Pg 60: Using Cameras in AR
The Vuforia "AR Camera" is a built-in GameObject that can be inserted into the scene via main menu GameObject | Vuforia | AR Camera (or the Hierarchy's Create menu).
Pg 63-68: Getting and using Vuforia
Vuforia is not a separate asset package. Install Vuforia via Download Assistant. Then,
- Go into Player Settings (via Edit | Project Settings | Player)
- In Inspector, in the XR Settings section, check the Vuforia Augmented Reality Supported checkbox
- When you attempt to insert a Vuforia game object into a scene, for example GameObject | Vuforia | AR Camera you will be prompted to "Import Vuforia Assets". Click the Import button to add them to your project.
You will now have the following new folders and files in your Assets:
- Editor/Vuforia
- Resources/VuforiaConfiguration (file)
- StreamingAssets/Vuforia
- Vuforia/
Pg 73: Adding AR Camera to the Scene
To replace the default Main Camera with a Vuforia AR Camera:
- In the Hierarchy panel, delete the Main Camera
- From main menu, select GameObject | Vuforia | AR Camera
There is no need to add the Camera Settings component.
Pg 74: Adding a target image
If the sample images are no longer available at the Vuforia.com link indicated in the chapter, try the Downloads Samples page (https://developer.vuforia.com/downloads/samples). You can also find them in the book's GitHub (https://github.com/ARUnityBook/ARBook-Vuforia/tree/master/Assets/Editor/Vuforia/ForPrint)
Alternatively you can go off the rails a little, download and play with the current Core Features samples from the Unity Asset Store (Mars assets) https://assetstore.unity.com/packages/templates/packs/vuforia-core-samples-99026
To add ImageTarget to your scene, instead of a prefab, use GameObject | Vuforia | Image
No changes.
Pg. 167: Setting up the project (Vuforia)
To create a new project using Vuforia:
- Open Unity 2017.2 (or later), create a new 3D project
- In Player Settings (via Edit | Projects Settings | Player) check the Vuforia Augmented Reality Supported checkbox
- In your browser, go to Vuforia website Developer Portal's License Manager (https://developer.vuforia.com/targetmanager/licenseManager/licenseListing, login required), create or choose a license key to open it, and copy the key codes from the textbox on the screen
- Back in Unity, from main menu choose Window | Vuforia Configuration
- In the Inspector, paste your license key into the App License Key area
- Save the scene (File | Save Scenes), and save the project (File | Save Project)
To add the AR camera to the scene,
- Delete the Main Camera object from the Hierarchy
- From main menu select GameObject | Vuforia | AR Camera
- Save the scene
Pg. 168: Adding the ImageTarget to the scene
- From main menu, select GameObject | Vuforia | Image
Pg. 172: Enable extended tracking or not?
The Extended Tracking option is now located under Advanced options in the Image Target Behavior component.
Pg. 219: Creating our initial project
See steps above (Chapter 4)
Pg. 221: Using a marker target
If the sample images are no longer available at the Vuforia.com link indicated in the chapter, try the Downloads Samples page (https://developer.vuforia.com/downloads/samples). You can also find them in the book's GitHub (https://github.com/ARUnityBook/ARBook-Vuforia/tree/master/Assets/Editor/Vuforia/ForPrint)
Find the configuration settings via Window | Vuforia Configuration
No changes.
Pg. 331: Setting up the project for AR with Vuforia
See steps above (Chapter 4)
Pg. 338: Adding a user-defined target builder
- From main menu, select GameObject | Vuforia | Camera Image | Camera Image Builder
Pg 339: Adding an image target
- From main menu, select GameObject | Vuforia | Camera Image | Camera Image Target
*Pg. 450: Set up project and scene for Vuforia"
See steps above (Chapter 4)
Pg. 451: Set the image target
- From main menu. select GameObject | Vuforia | Image
SmartTerrain is not yet integrated into Unity 2017.2 built-in Vuforia support. Until it becomes available (Unity 2017.3 ?) we recommend you use Vuforia 6.2 version components. Use this project branch: https://github.com/ARUnityBook/ARBook-Vuforia/tree/BookPublished