Our June 2023 Operating System and SDK Release is now available for download in the Magic Leap Hub, featuring exciting MLSpaces API updates for C and Unity, an experimental new MLOcclusion C API, and much more. We’ve also been busy adding to our catalog of developer guides on our Developer Portal.
This month we’re spotlighting two third-party tools with sample guides on our Developer Documentation catalog.
Photon Fusion is a third-party high-end state transfer netcode SDK made for Unity developers. Learn how to incorporate Photon Fusion into your Magic Leap 2 project to create shared experiences for multiple co-located users. Our guide enables you to allow users to share and interact with the same virtual space. Learn more
A sample scene in Unity for integrating Photon Fusion with Magic Leap 2.
The Agora Real-time Communications SDK enables real time voice and video communication capabilities to the Magic Leap 2, desktop and mobile devices. Check out Agora’s guide to building live video streaming into your Magic Leap 2. Learn more
In addition to simple voice and video, the Agora SDK offers call recording, screen sharing and collaboration, multiple audio and video tracks, high-quality video at scale, AI-powered audio enhancement, global coverage and more.
A sample scene in Unity integrating the Agora Real-time Communications SDK with Magic Leap 2.
Power Manager provides a set of power management APIs that allow applications to receive callbacks when the power state changes, as well as APIs to get device components power state and properties, and to set the controller’s power states. (C API Unity)
These APIs allow an application to function differently depending on its power needs. For example an application might use this API to put the controller in the idle state if the input mode is hand-tracking only.
Controller Power States:
- Normal: Controller is active
- Disabled While Charging: Certain SKUs cannot use controller while charging
- Standby: Controller is turned on but inactive, press home button to switch to active manually
- Sleep: Not supported for this component
For Unity, we’ve added a new MLSpace API for importing and exporting spaces without the need for scanning the environment. On the C API side, we’ve updated our MLSpace API to include CFUID in the MLSpaceLocalizationResult to provide pose data.
MLSpace allows developers to manage Spaces inside their application. This includes functionality such as querying a list of spaces, requesting localization into a specific Space and importing/exporting on device Spaces.
Applications that import/export spaces will need to add the com.magicleap.permission.SPACE_IMPORT_EXPORT permission to their manifest and request it at runtime.
The format of the exported Space data can change with OS version updates.
Space - Backwards compatibility:
A Space exported using OS version n should work on OS versions up to and including OS version n-4.
Space - Forwards compatibility:
A Space exported using OS version n is not guaranteed to work on OS versions greater than n. Developers are strongly encouraged to encrypt the exported Magic Leap Spaces.
Also new this month is our experimental MLOcclusion API for native C development. This new API gives developers more flexibility to accurately render a virtual object behind real-world objects, which is paramount to an immersive AR experience.
Now when a virtual object is rendered in front of users, MLOcclusion enables developers to easily make it appear blended in the real world.
- Minimum API level updated to 28 for Unity SDK
- New MLOcclusion API (experimental) (C API)
- MLSpace API: updates to include CFUID in the MLSpaceLocalizationResult to provide pose data (C API)
- MLHandTracking API: added support for unfiltered keypoints (C API)
- Updated C API Application Framework and CAPI Samples apps to remove the usage of deprecated APIs
- Performance and stability improvements to Android Audio APIs
- April tag rotation has been changed by 180° around the z-axis making April tag poses consistent with ArUco marker and QR code poses
Listed below are the version numbers of the packages that comprise the June 2023 update:
- Magic Leap OS - 1.3.0-dev2 [B3E.230526.01-R.026]
- Unity SDK -1.8.0
- C SDK - 1.3.0-dev2
- MRTK - 1.8.0 Version 1.0
- OpenXR - 1.3.0-dev2
Reminder: if you update to the latest SDK, you also need to update the OS on your device. If you are using Unity, be sure to use the versions listed above for full compatibility. After you download the packages listed above, check out our setup guides.
Unity announced long term support for its 2022 editor and runtime June 1. Magic Leap 2 requires 2022.2.x, so now developers can be sure they are building for a stable Unity LTS environment when developing Magic Leap apps. Time to get started!
We have deprecated the following MLWebView APIs:
- MLSpatialAnchorGetLocalizationInfo(), replaced with MLSpaceGetLocalizationResult()
- MLHandTrackingCreate(), replaced with MLHandTrackingCreateEx()
See our full list of deprecated C APIs.
- MLHeadTrackingState and related dependencies marked Obsolete.Use `MLHeadTracking.StateEx instead.
See our full list of deprecated Unity APIs (see sidebar for deprecated section).
That’s it for this month’s release. Be sure to check out our new third-party integration guides for Magic Leap 2 and let us know what tutorial you want us to tackle next on on this forum.