Vuforia Digital Eyewear Sample

This guide shows how to set up a Unity project with Vuforia, OpenXR, and MRTK3 using the Vuforia Digital Eyewear Sample for the HoloLens and Magic Leap devices.

QuickStart by adding the Vuforia Digital Eyewear Sample available in the Asset Store to your account and use the Package Manager to import the sample.

Prerequisites

A supported Unity Editor Version. See Supported Versions.

Setup for HoloLens:

Setup for Magic Leap:

Setup for Eyewear Devices

This section has the steps and links to guides that show how to set up a Unity project with MRTK and Open XR, targeting either HoloLens or Magic Leap. If you import the Digital Eyewear Sample, these settings are automatically handled.

HoloLens

Follow these guides to set up a project for HoloLens:

  1. Start by Setting up a new Unity project with MRTK3. These include importing dependencies from the Mixed Reality Feature Tool, configuring the MRTK profile, and configuring the OpenXR settings.
  2. Go to the Project Settings’ UWP tab, select Publishing Settings -> Capabilities, and enable InternetClient and Webcam. These are necessary for the Vuforia Engine.

  3. Follow Creating a new scene with MRTK3 to add the MRTK XR Rig prefab to the scene.
  4. Import the Vuforia Engine package and add the Vuforia Behaviour and Default Initialization Handler components to the XR Rig's main camera.

TIP: Add any Vuforia target to the scene, and the necessary components will automatically be added to the Main Camera.

NOTE: The Vuforia Engine does not support the MRTK simulator because the tracking poses received during play mode do not work with it.

MagicLeap

Follow these steps to set up a project for Magic Leap:

  1. Import Magic Leap Unity SDK using their QuickStart or manual setup steps. Include the steps of creating a Custom Manifest and adding the permissions required by the Vuforia Engine.
  2. Add the MRTK 3 features using the Mixed Reality Feature Tool.
  3. Follow the guide to configure your MRTK3 project, and import the Magic Leap MRTK 1.0.0 into your project.

If configuring a project that needs to be built for both Magic Leap and HoloLens, make sure to enable the runtime config in the Magic Leap Settings:

  1. Go to Project Settings -> MRTK3 -> Magic Leap Settings and enable the Runtime Config.

  2. Also, add the permission settings Camera and Spatial Mapping found in the same tab window.

NOTE: If you use the runtime configuration, we recommend using the MRTK XR Rig prefab instead of the MRTK XR Rig – Magic Leap Open XR prefab. If you are only building for Magic Leap, the Magic Leap Open XR prefab should be used.

Import the Vuforia Digital Eyewear Sample

Download the Unity Asset Package from the Downloads page or add the package from the Unity Asset Store and import it with the Package Manager. The package will include all dependencies during the import.

  1. In Unity, select Assets -> Import Package -> Custom Package and open the Vuforia Digital Eyewear Unity Asset Package.
  2. In Unity, select Window -> Package Manager -> My Assets and select the Vuforia Digital Eyewear Sample.

Both methods install all dependencies to build AR experiences for HoloLens and Magic Leap.

The dependency packages are:

Magic Leap Unity Package v2.1.0.

Magic Leap Unity MRTK3 v1.0.0.

NOTE: The ML C SDK package is no longer necessary, but the Magic Leap Hub installs it along with the other Unity-specific resources.

  1. Click Import in the pop-up window to add the package.
  2. Click Install/Upgrade in the pop-up window asking you to install/upgrade dependencies.

  3. Click No in the next pop-up window asking you to restart the editor.

  1. In the next pop-up, click Update to import the sample dependencies.
  2. Click Update in the next pop-up window asking to update the Vuforia Engine Package.
  3. In the final pop-up window, click Restart to restart the Editor and conclude the import of the Digital Eyewear Sample.

Sample Scenes

The sample contains three scenes that let you track Image Targets, Model Targets, and VuMarks.

Remember to select the correct platform for the device you are targeting. Android for Magic Leap and Universal Windows Platform for HoloLens.

See their guides for build instructions.

Magic Leap Player Settings, including the Build Settings.

HoloLens Recommended Settings for Unity and Build and deploy to the HoloLens.

Can this page be better?
Share your feedback via our issue tracker