Spatial Anchors not working in Unreal Engine Examples project

Hi, I am trying to run the example for Spatial Anchors in Unreal Engine but it isn't working, I am following what I believe is the proper procedure in the example to add a spatial anchor or to try to query them but I'm not getting anything and no matter what I do I can't seem to get it to work in either the Examples project or in my own. I took a look at the error and warning logs and apparently it is looking for a few extensions that it says are not available but I don't know how to add them either.

Magic Leap SDK version: 1.9.0
Unreal Engine version: 5.4.3
ML2 OS version: 1.9.0

These are the Error and Warning messages from logs:

Warnings:
LogHMD: Warning: Required extension XR_ML_world_mesh_detection is not available
LogHMD: Warning: Required extension XR_EXT_future is not available
LogHMD: Warning: Required extension XR_ML_spatial_anchors is not available
LogHMD: Warning: Required extension XR_ML_spatial_anchors_storage is not available
LogHMD: Warning: Required extension XR_EXT_future is not available
LogHMD: Warning: Required extension XR_ML_pixel_sensor is not available
LogHMD: Warning: Required extension XR_EXT_future is not available
LogHMD: Warning: Required extension XR_ML_light_estimation is not available
LogHMD: Warning: Required extension XR_ML_world_mesh_detection is not available
LogHMD: Warning: Required extension XR_EXT_future is not available
LogHMD: Warning: Required extension XR_ML_spatial_anchors is not available
LogHMD: Warning: Required extension XR_ML_spatial_anchors_storage is not available
LogHMD: Warning: Required extension XR_EXT_future is not available
LogHMD: Warning: Required extension XR_ML_pixel_sensor is not available
LogHMD: Warning: Required extension XR_EXT_future is not available
LogHMD: Warning: Required extension XR_ML_light_estimation is not available
LogStreaming: Warning: Failed to read file '../../../Engine/Plugins/Developer/PlasticSourceControl/Resources/Icon128.png' error.

Errors:
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogMagicLeapSpatialAnchors: Error: EnsureStorage: SpatialAnchors plugin failed to initialize, check for earlier errors
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.
LogXRDeviceVisualizationComponent: Error: CreateRenderComponent returned a NULL UPrimitiveComponent*. Setting a NULL StaticMesh.

Hello,

Welcome to the forums! Sorry about the trouble. Let's see if we can troubleshoot. Here are a few questions-

Did you build Unreal Engine yourself from source or are you using a binary install of UE 5? If you compiled the engine yourself, did you get the source code from the MagicLeap repo and if so what branch did you use to compile?

Are you trying to run the examples natively on your ML2 or are you using remote rendering?

Have you been able to run any of the other levels in the examples project or run any other basic UE app on your ML2?

Thanks!
Adam

I built the engine from source, and I did get the source code from the MagicLeap repo, using this command:

git clone --single-branch https://github.com/MagicLeapUnreal/UnrealEngine.git

As instructed by the Getting Started guide.

I am trying to run the examples using remote rendering, and I was able to successfully run all the levels in the project except for WorldMesh and SpatialAnchors. I have also been able to run another personal UE app through remote rendering as well.

Thank you!

Hello,

Unfortunately, that's expected. Neither world mesh, nor spatial anchors are currently supported by MagicLeap remote rendering. However, those examples should work if you build and package the examples project and run it natively on your ML2.

Best,
Adam

Hello again,

I tried running the examples natively in my ML2 from a build and they do in fact work, thank you!

Are there any plans to get the world mesh and spatial anchors to work via remote rendering in the future?

aheaney , correct me if I'm wrong, Support for Spatial anchors and Meshing in Remote Rendering are currently not on our roadmap, but I have shared your interest in these features with our voice of customer team.

As an alternative to Spatial Anchors, you can try using the Localization Map API, which allows you to query the map origin. This origin point can be used similar to an anchor.

After mapping your environment with the Spaces app you can also save the Mesh of the environment on your device. You could use this mesh as an alternative to real-time meshing depending on your app's needs.

Note: The OpenXR Localization Map Feature is Experimental in Remote Rendering.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.