Magic Leap 2
support (version 2022.2.0b7
or higher) and Android Build Support.Magic Leap Hub
from https://developer-docs.magicleap.cloud/docs/guides/getting-started/install-the-toolsMagic Leap Hub
open Package Manager
and select Unity
.Unity Package
.Open Folder
to find out the location of the file com.magicleap.unitysdk.tgz
that was installed with this step. Some UPM packages have to be installed in any project that will use VisionLib
s model tracking. Open the package manager and install the following packages (via Add package from tarball...
):
com.magicleap.unitysdk.tgz
file that was installed by Magic Leap Hub
above. This step will trigger some warnings.yes
(this will restart Unity). XR Interaction Layer Mask Update
is required. You can select No Thanks
here. MLSDK
is referenced in Preferences > External Tools > Magic Leap
. If it is not yet referenced, find the path in Magic Leap Hub > Package Manager > Common Packages > ML C SDK
by clicking on the Open Folder
button. VisionLib.SDK-Unity.tgz
package.Google ARCore XR Plugin
is not installed in the package manager.Deployment to Magic Leap
requires some adjustments of the default project settings in Unity.
Player Settings > Android > Other Settings > Rendering
Color Space
to Linear.Auto Graphics API
, add the Vulkan
Graphics API (if it is not already listed) and remove all others.Texture compression Format
to DXT + RGTC(BC4, BC5)
.Player Settings > Android > Other Settings > Configuration
Scripting Backend
to IL2CPP
.x86-64 (Chrome OS and Magic Leap 2)
.Project Settings > XR Plug-in Management > Android
select the Plug-in Provider Magic Leap
.VisionLib.SDK
comes with an example scene that shows how model tracking can be achieved on Magic Leap 2
devices. This section explains how to set it up.
Extensions > VisionLib.SDK.MagicLeap.Examples-Unity.unitypackage
.MagicLeapModelTracking
scene from Assets > VisionLib MagicLeap Examples
.The example scene uses voice commands to control the tracker. To use that, you have to change some settings both inside the project and also on the device.
Player Settings > Publishing Settings > Build
and select Custom Main Manifest
.Project Settings > Magic Leap > Permissions
and select VOICE_INPUT
.Settings > Magic Leap Inputs > Voice
.Voice Commands
.Instead of starting from the example scene, you can also add VisionLib.SDK
to an existing Magic Leap 2
Unity scene.
VLXRCameraMagicLeap
from Packages > VisionLib SDK > MagicLeap > Prefabs
to your scene.TrackingConfiguration
component to one of your GameObjects
. Specify a license file and your tracking configuration file in the TrackingConfiguration
.ImageInjectionModelTrackingConfiguration.vl
from StreamingAssets > Examples > MagicLeap > ModelTracking
that is provided in the VisionLib.SDK.MagicLeap.Examples-Unity.unitypackage
.Running VisionLib.SDK
on Magic Leap 2
requires a license for the device type Android_x86_64
. Our trial license includes this feature.
Please contact sales@visometry.com
for questions regarding your VisionLib.SDK
license.