The Magic Leap Vuforia Sample is a great way to start developing for the Magic Leap eyewear device. The sample can be easily imported into an existing Magic Leap Unity project and requires only a few steps to get you started.
To get started with the Vuforia Sample, please follow the guide below.
There are now two Vuforia HoloLens and Magic Leap Sample packages available in the Unity Asset Store. Please select the package that matches your Unity project version 2019 or 2020 and later.
Set up your Unity Project
Ensure first that your Unity installation includes Lumin OS (Magic Leap) Build Support. You will also have to configure your project to use the Magic Leap Loader in the XR Plugin Management package. Refer to Developing Vuforia Engine Apps for Magic Leap for more information.
NOTE: The sample will automatically prompt you to include the correct Vuforia Engine package version. Also, it already contains the scripts and assets from the Magic Leap Unity Package, so importing this package is not required for this sample. Importing another version of that package, overwriting what is included in the sample, may cause incompatibilities.
Add the Vuforia Sample
The Vuforia Sample package includes scenes with pre-configured components. Simply import it into your Unity project and build it to your Magic Leap device.
- Import the Vuforia Magic Leap Sample for either Unity Version 2019 or Unity Version 2020 from the Unity Asset Store.
- Importing the Sample project might require you to Install/Upgrade Package Manager dependencies.
Set up package signing
- Navigate to Project Settings -> Player -> Publishing Settings. Check the box for Sign Package and continue to add your Magic Leap developer certificate.
If you do not have one, we recommend visiting Magic Leap's Get a Developer Certificate to learn more on how to obtain one. Just remember, that you will need both the .cert file and the .privkey file in the same folder for the certificate to work.
Building to the Magic Leap Device
- Once the package has been imported, go to Build Settings and verify that the Vuforia sample scenes were added. Build the .MPK file to the device by pressing the Build and Run button.
TIP: Print the Image Targets and place them next to each other to see them interact with each other.