Digital Eyewear Unity Samples

The digital eyewear samples demonstrate how to develop and configure Vuforia apps for both optical and video see-through Digital Eyewear.

There are two Digital Eyewear samples:

  • Stereo Rendering, for optical see-through devices
The stereo rendering sample will show you how to configure a stereo display for your Vuforia apps. This sample is applicable to supported optical see-through devices supported by the Vuforia SDK. See: Using the Unity Stereo Rendering Sample
  • AR/VR, for video see-through devices
The AR/VR sample will show you how to develop AR/VR mixed reality experiences for video see-through devices that can seamlessly transition between AR and VR modes within the same app.

See:
Integrating Cardboard to the AR/VR Sample
Integrating Oculus for GearVR with the AR/VR sample

Importing the samples

To import the Digital Eyewear samples into a new Unity project:
  1. Either double click on the unitypackage file (*.unitypackage to launch the Import Package dialog or import the same Unity package by selecting it from the Unity Editor menu from Assets > Import Package > Custom Package.
  2. Click the Import buttons at the bottom right of the Importing Package window.
To import the samples into an existing Vuforia Unity project:
  1. Follow the steps in the Vuforia Unity project migration guide, See: How To Migrate a Unity Project
  2. Follow the steps to import the sample into a Unity project set out above.

Running the samples

Before you build and run on the Android device

1. Obtain an App License Key and paste it into the field in the inspector for VuforiaBehaviour, See: How To add a License Key to your Vuforia App
2. Ensure the latest Android SDK has been installed and that its location has been defined in the Unity Editor ( Unity > External Tools > Android SDK Location ).
3. Ensure that you have configured the drivers for your eyewear device on your computer following the instructions provided by the manufacturer.
4. Connect the device to your PC/Mac and check that the command adb devices results in a log that shows that it is connected.

Building and Executing the Sample

1. Set your platform build target for Android in File > Build Settings.
2. Add your scene(s) to Scenes in Build.
3. Define a unique Bundle ID in Player Settings > Other Settings.
4. Define a unique Product Name to serve as the name of the app when installed on a device.
5. Select Build to generate an executable or Build & Run to both generate an executable and deploy it to a connected device.
6. You may be asked to specify the location of the installed Android SDK configured your Unity installation for Android already.

There is no need to change any of the default Player Settings to support Vuforia SDK for Digital Eyewear. You can customize the presentation of your app on the device by adding icons and splash images in Player Settings and setting the app’s device orientation.

When running the sample on a device you should see a stereo rendering of the AR content with a different image delivered to each eye. The video background will be turned off. The devices will be switched to 3D mode by Vuforia prior to showing any augmentation.

See:
Configuring the ARCamera Prefab for Digital Eyewear
Integrating Cardboard to the AR/VR Sample