Removing Magic Leap 2 Spaces

Hello everyone,

I was just curious if it is possible to delete a space via my unity app instead of having to go into the Spaces app to do it. There are functions for exporting and importing spaces but it would be useful to have one for deleting spaces. If there is a way to delete a space with an space ID via my unity app it would be super helpful for what I am trying to accomplish. :slight_smile:

Hi @ernestas.milinskas,

Unforutnately, it is not possible to delete a space via the Spaces API. To better understand your use case, could you please share an example of how you would use this feature in an app for the ML2. Are you trying to obfuscate the Spaces feature from users who are not developers?



Thank you for replying @etucker ,

Currently I'm trying to implement networked spatial anchors without using AR cloud. I am trying to make the process easier for the user who is using the application so they would not have to go into the Spaces application incase it's their first time using the magic leap, instead I would like my app to manage things like spaces. The current solution has me network a map after the user creates an anchor to other users who are in the application, it works as expected for people who do not have that map already but for the people who already have a map (if the map has been networked already), they have to go into the spaces app, delete the map and then go through the process again. Was just wondering if there's a nice way of managing this via my app. :slight_smile:

@ernestas.milinskas from a workflow would allowing the map to update when loading a map with the same ID be sufficient here? Just trying to understand the workflow a little better. I imagine it would be convenient to just update the map with the latest import rather than needing to delete and load in a new one?

@mrushton that would be the best outcome if I could just update the map with updated information if the ID's matched. The only reason for suggesting deleting the map was because the abd shell mlmapping function had a delete_space function so was wondering if there was an API implementation of that since I couldn't find anything for replacing the map :sweat_smile:

I agree its a necessary function, I'll report back once it is aligned to a release schedule. It won't be too far in the future.


Thank you very much!