Getting Started with Vuforia Engine in Unity

Vuforia Engine in Unity

As of 2017.2, Unity integrates the Vuforia Engine, making it even easier to create cutting edge augmented reality experiences for both handheld and headworn devices. You can learn more about the Vuforia Engine platform at developer.vuforia.com

About Vuforia Engine

Vuforia Engine is a software platform for creating Augmented Reality apps. Developers can easily add advanced computer vision functionality to any application, allowing it to recognize images and objects, and interact with spaces in the real world.  

The Vuforia Engine platform supports AR app development for Android, iOS, and UWP devices. See: Vuforia Supported Versions

This Getting Started guide will show you:

  • How to install Vuforia Engine with Unity
  • How to activate Vuforia Engine in your projects
  • How to access Vuforia Engine’s features in Unity 

Installing Vuforia Engine 

Download and run the Unity Download Assistant 2017.2 or later from the Unity website: https://unity3d.com/. Accept Unity’s license agreements.

In addition to your platform support (iOS, Android, UWP), select Vuforia Augmented Reality Support in the Components selection dialog. Then continue with your installation.

Vuforia Image

Create a new Unity project

Vuforia Image

It’s recommended that you use a 3D project set-up.

Vuforia Engine Game Objects

Vuforia Engine will be visible in the Unity Game Object menu and also in Build Settings and Player Settings.

Vuforia Image

Activate Vuforia Engine in your project

You must activate Vuforia Engine in your project before building a Vuforia app, or use Vuforia Engine in Play Mode. Go to Player Settings to activate Vuforia Engine under the "XR Settings" section and check "Vuforia Augmented Reality".

Vuforia Image

Accessing Vuforia Engine features in Unity

After activating Vuforia Engine in Unity, you can add features of Vuforia Engine to your project from the Unity GameObject Menu. Please refer to Features Overview for more information on all of the capabilities offered by the Vuforia Engine.

Start by adding an ARCamera. This is a special camera type that supports augmented reality apps for both handheld devices and digital eyewear. 

Steps:

  1. Add an ARCamera
  2. Open the global Vuforia Configuration Inspector
  3. Activate the target databases
  4. Add targets to your scene

1. Add an ARCamera. Delete Main Camera.

Vuforia Image

Print Physical Targets

This is a good time to print some targets to work with. You can find these in /Editor/Vuforia/ForPrint. We’ve provided a complete set of high-resolution target prints to get you started.

Vuforia Image

Printable target PDFs can be found in /Editor/Vuforia/ForPrint

Add Targets to your scene

Vuforia Image

2. Add targets to your scene

You can add Vuforia targets to your scene by selecting the associated Game Objects in the GameObject> Vuforia menu. A target Game Object will be added in your scene hierarchy, which will be visible in your scene.

Each target object can be configured in the Inspector.  Select the database and target name for the target you want to use. 

Adding digital assets

You’re now ready to add digital content to augment your target. You can do this by simply adding your assets as children of the target in the scene hierarchy. Parenting content with a target object automatically sets up the necessary rendering and physics behaviors (see: DefaultTrackableEventHandler.cs).

Vuforia Image

Add content as a child of the target.

Tip: Delete the default Main Camera after adding an ARCamera. The ARCamera contains its own scene Camera. You won’t need the Main Camera unless you are using it to render a specific camera view.

Playing the scene

Vuforia Engine provides a simulator in the Game view that you can activate by pressing the Play button. You can use this feature to evaluate and rapidly prototype your scene(s) without having to deploy to a device.  

Play Mode is configured in the WebCam section of the Vuforia Configuration. 

Building and running your app

Vuforia Engine-powered Unity apps are built and run in the same way as other Unity apps for Android, iOS, and UWP.

See: Building section https://unity3d.com/learn/tutorials/s/mobile-touch

Configuring a project for Digital Eyewear

Vuforia Engine supports a variety of optical and video see-through stereo rendering displays including HoloLens, the ODG R-7, and a range of VR viewers for smartphones. See: Digital Eyewear

To configure you project for stereo rendering and support these displays, you will need to enable VR Support in XR Settings. You will then need to add a VR SDK to the accompanying list.

For HoloLens - add HoloLens as the top VR SDK. See: Developing Vuforia Apps for HoloLens

For all other stereo rendering devices - add Vuforia as the top VR SDK. See: Working with Digital Eyewear

You'll also want to configure the Digital Eyewear component on the ARCamera in your scene. Review the linked articles for more information.

Learn more

Register as a Vuforia developer to access our support forums and advanced features of the Vuforia Engine platform.