# Auto Localisation on the Magic Leap 2

**URL:** <https://forum.magicleap.cloud/t/auto-localisation-on-the-magic-leap-2/7010>\
**Category:** General\
**Tags:** development\
**Created:** [April 2, 2026, 8:12pm UTC](https://forum.magicleap.cloud/t/auto-localisation-on-the-magic-leap-2/7010 "2026-04-02T20:12:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![toby.browne](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@toby.browne](https://forum.magicleap.cloud/u/toby.browne)\
**Post date:** [April 2, 2026, 8:12pm UTC](https://forum.magicleap.cloud/t/auto-localisation-on-the-magic-leap-2/7010/1 "2026-04-02T20:12:17Z")

</div>

Hi.

Simple question from me, but was not able to find the answer elsewhere. When I create more than one Space, I can manually localise into one of the spaces using the API or the Spaces app. Is there not a way to automatically detect which space the user is in and localise to the correct space?  
If not, then do you have suggestions on how one may implement a feature like this.

---

<div class="post-metadata">

**Author:** ![jspire](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jspire](https://forum.magicleap.cloud/u/jspire)\
**Post date:** [April 2, 2026, 8:30pm UTC](https://forum.magicleap.cloud/t/auto-localisation-on-the-magic-leap-2/7010/2 "2026-04-02T20:30:33Z")

</div>

Hi,  
Can you tell me a bit more about the use case here? I assume you want to have say, location A saved as a Space and then an entirely different location B saved as another Space and have the ML2 automatically recognize it without you ever having to load either Space?

---

<div class="post-metadata">

**Author:** ![toby.browne](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@toby.browne](https://forum.magicleap.cloud/u/toby.browne)\
**Post date:** [April 3, 2026, 3:54pm UTC](https://forum.magicleap.cloud/t/auto-localisation-on-the-magic-leap-2/7010/3 "2026-04-03T15:54:53Z")

</div>

Yes exactly. Just curious whether the MagicLeap supports this. If a User is using an app, and has anchors in different rooms, it would be a bit of a pain for them to have to open some menu to pick what space they are currently in. It would be good if the device could localise into the correct space, but not sure if this is supported.

---

<div class="post-metadata">

**Author:** ![jspire](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jspire](https://forum.magicleap.cloud/u/jspire)\
**Post date:** [April 3, 2026, 8:34pm UTC](https://forum.magicleap.cloud/t/auto-localisation-on-the-magic-leap-2/7010/4 "2026-04-03T20:34:25Z")

</div>

How big are the rooms we’re talking about? As far as I know you can have multiple rooms contained in a Space and multiple Anchors. While Magic Leap doesn’t have specific APIs for this, Unity and Unreal can support. You can also use QR codes to assist with this I believe.

See the Localization Map and Spatial Anchor Storage Docs

> **[Localization Map Examples | MagicLeap Developer Documentation](https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/localization-map/simple-example/)**
>
> These scripts demonstrate various functionalities of the OpenXR Localization Map Feature, which is used for managing spaces in a mixed reality environment. The scripts are broken down into specific functionalities: requesting permissions, retrieving...

> **[Spatial Anchors Storage Example | MagicLeap Developer Documentation](https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/spatial-anchor-storage/unity-spatial-anchor-storage-example/)**
>
> This API allows you to create, manage, and persist spatial anchors in Unity using Magic Leap spatial anchor storage feature. Spatial anchors and their storage are two different but related features, using ARFoundation for the anchors in scene and the...

---

<div class="post-metadata">

**Author:** ![toby.browne](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@toby.browne](https://forum.magicleap.cloud/u/toby.browne)\
**Post date:** [April 4, 2026, 10:10am UTC](https://forum.magicleap.cloud/t/auto-localisation-on-the-magic-leap-2/7010/5 "2026-04-04T10:10:14Z")

</div>

Yes you can have multiple rooms within the same space. If a user did have many spaces mapped would you therefore recommend showing some kind of UI panel for them to choose which of the spaces they are in (assuming QR codes can’t be used)?
