# How do you add a simple spatial map?

**URL:** https://forum.magicleap.cloud/t/how-do-you-add-a-simple-spatial-map/2622
**Category:** Unity Development
**Created:** [September 26, 2023, 3:33pm UTC](https://forum.magicleap.cloud/t/how-do-you-add-a-simple-spatial-map/2622 "2023-09-26T15:33:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![localjoost](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/localjoost/32/1829_2.png) [@localjoost](https://forum.magicleap.cloud/u/localjoost)
#### Post date: [September 26, 2023, 3:33pm UTC](https://forum.magicleap.cloud/t/how-do-you-add-a-simple-spatial-map/2622/1 "2023-09-26T15:33:42Z")

</div>

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.](https://github.com/magicleap/MagicLeapUnityExamples.git), 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?

---

<div class="post-metadata">

### Author: ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)
#### Post date: [September 26, 2023, 10:37pm UTC](https://forum.magicleap.cloud/t/how-do-you-add-a-simple-spatial-map/2622/2 "2023-09-26T22:37:23Z")

</div>

Hi @localjoost,

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

> [@localjoost](#):
>
> Is there any very minimal sample that shows how to do it

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

> **[Meshing and occlusion - Unity Learn](https://learn.unity.com/tutorial/meshing-and-occlusion?uv=2022.2&courseId=643419cbedbc2a5f42275126#64353d12edbc2a10db349518)**
>
> Meshing refers to the process of creating a 3D mesh or model of the physical environment, including surfaces, edges, and corners. Unlike plane detection, which only detects flat surfaces, meshing detects all kinds of geometry. In this tutorial, you...

Let me know if you have any further questions.

Best,

El
