How do you add a simple spatial map?

I am trying to add a simple Spatial Mesh to an app. Adding an ARMeshManager (which works on HoloLens) does not seem to cut it, which is a shame, as this is a Unity behaviour, and implementing this on ML might have been a nice cross platform way to do it.

Anyway I pulled the examples from GitHub - magicleap/MagicLeapUnityExamples: This project contains Examples for the Magic Leap Unity SDK and has been configured so developers can start developing for the Magic Leap platform quickly., and I learn I should use MeshingSubsystemComponent. Nice. That sample shows the Mesh really elaborate, the problem with that sample is: there is too much in it. It does not tell me what I need to do to get a simple spatial map, using either Wireframe, occlusion or an invisible material. I simply added a MeshingSubsystemComponent to my scene, created a prefab with a MeshRenderer, a MeshCollider and a MeshFilter, just what I also need in HoloLens, and just what seems to be used in the Meshing sample. I also make sure the permissions are requested and set.

Yet nothing happens. Is there any very minimal sample that shows how to do it, or what I might be missing? Do I really need a component to create the actual mesh myself, like in the sample?

Hi @localjoost,

Welcome to the Magic Leap 2 Developer Forums. We are so grateful to have you here engaging with us.

We have some Unity Learn tutorials that show how to use the meshing feature step-by-step.

Let me know if you have any further questions.