This page concerns the Vuforia Engine API version 9.8 and earlier. It has been deprecated and will no longer be actively updated.
Vuforia Engine offers beta support for the Magic Leap One Creator’s edition eyewear device. Use the Vuforia Engine to build powerful AR experiences for the Magic Leap devices using Vuforia’s many features including; Image Targets, VuMarks, and Model Targets. Combine robust tracking of the physical environment and objects with the Lumin OS and create augmented instructions to workers and visitors, or spark joy with immersive effects for toys, cars, and appliances. Start your Vuforia and Magic Leap journey here with setting up the Vuforia Engine, Magic Leap Lumin SDK, and the Unity Editor.
For a guide on how to connect your Magic Leap device, see Magic Leap’s Connect Device documentation.
Vuforia offers two Unity version specific sample packages (v. 2019.4 and 2020.2) for the Magic Leap One device. The following setup guide needs to be adjusted according to the Unity version that you will use:
Unity 2019.4 | Unity 2020.2+ |
Lumin SDK 0.24.1 Magic Leap XR Plugin 4.1.0+ |
Lumin SDK 0.25.0+ Magic Leap XR Plugin 6.2.2+ |
Start by installing the tools for developing with Vuforia Engine and Unity.
- Download a Unity Editor version supporting Magic Leap and Vuforia Engine.
- Install Unity with the support module for Lumin OS (Magic Leap) Build Support included in the installation.
- See Magic Leap’s Unity Setup guide for details.
- Install Unity with the support module for Lumin OS (Magic Leap) Build Support included in the installation.
- Create a new empty Unity 3D project with the Unity Editor version that supports the Lumin OS.
- Add Vuforia Engine to the project.
- Add a valid license key to Vuforia Configuration. See How to Add a License Key to your Vuforia Engine App
- Add the Lumin SDK to Unity.
- Create your Magic Leap developer account if you do not yet have one.
- Download the Magic Leap Package Manager.
Follow Magic Leap’s guide to download and set up the required resources for Unity.
NOTE: Install the latest Magic Leap Unity Package as well as the Lumin SDK.
Setting up Vuforia Engine and Lumin SDK in the Unity Editor
- In the Unity project, go to Edit (Unity on Mac) -> Preferences -> External Tools and browse to the folder location where you have installed the Magic Leap Lumin SDK. It is usually found at /Users/<User-folder>/MagicLeap/tools/unity/Vx.xx.x
- Navigate to Build Settings and press the Switch Platform button to change to Lumin.
- While in the Build Settings window, select the Player Settings and go to the expandable menu Other Settings and ensure that API Compatibility Level is set to .NET 4.x.
- Next, download the Magic Leap XR Plug-in package available in Window -> Package Manager.
- Go to Edit -> Project Settings -> XR Plug-in Management and in the tab with the Lumin icon, check the box for Magic Leap for the Plug-in Providers.
At this point, your project is ready for the preconfigured Magic Leap Vuforia Sample. Head over to Working with the Vuforia Magic Leap Sample in Unity to get started.
For a custom set up, continue with the steps below.
- Import the Magic Leap Unity Package by navigating to Assets -> Import Asset -> Custom Package.
- Select the Magic Leap Unity Package. The packages can be found in the directory: [User]/Magic Leap/Tools/Unity/Vx.xx.x
NOTE: if you receive an “API update required” notification, go ahead and press ‘I made a Backup, go ahead!'.
- Return to the Project Settings’ Player configuration panel.
- Go to Publishing Settings to sign your Magic Leap application.
- Check the box for sign package and add your Magic Leap certificate. See Get a Developer Certificate if you do not yet own one.
Unity has now set up with the Lumin SDK and the Vuforia Engine.
Adding Vuforia Components
- Start by replacing the Camera GameObject with the Magic Leap Main Camera Prefab located in Assets->MagicLeap->Core->Prefabs.
- Proceed to add the following components to the Magic Leap Main Camera GameObject.
- Vuforia Behaviour
- Default Initialization Error Handler
- We can now add Vuforia's Image Target feature to the project. Go to GameObject -> Vuforia Engine and select Image Target. Choose the Image Target type from the inspector. See Image Targets to learn about databases, instant Image Targets, and Cloud Recognition. Selecting Database lets you import a default Vuforia Image Target Database.
- Add a Cube GameObject as a child to the ImageTarget GameObject.
- You can use Unity's hand, move, rotate, and scale tool to align the cube on top of Image Target.
Manifest settings
- In Edit -> Project Settings go to MagicLeap -> Manifest Settings and change the minimum API level to level 7.
- Add the following privileges in the expandable menus Autogranted, Sensitive, and Reality.
- Autogranted
- Internet
- LowLatencyLightwear
- PcfRead
- Sensitive
- LocalAreaNetwork
- Reality
- CameraCapture
- ComputerVision
- Save the project and Save the scene.
- Go to File-> Build and Run. This should compile and install the .MPK file on your ML device given that it is connected. A new window will ask whether to allow the application to access camera etc. Grant all permissions and look at the Image Target, in this case, the default database’s astronaut image.
You can print the ImageTarget for testing from Assets/Editor/Vuforia/ForPrint/ImageTargets/target_images_USLetter.pdf