Question about AR: Can you save IRL room layouts for gameplay?

I have a question about Augmented Reality for mobile and if it is possible to save a room layout for gameplay. For example, you scan 2 rooms in real life before starting the game and during the game, you can move between both rooms IRL and the game will know which one you are in and can adjust gameplay accordingly.

I wouldn’t even know what to search to find info about this

You’ll need to build it, but I’ve seen a few people with tech examples on how they do it. We did it with OpenCV and wall markers but there are much easier ways now

If your app is for iOS only, you may be able to leverage AR world map.

See GitHub - Unity-Technologies/arfoundation-samples: Example content for Unity projects based on AR Foundation for an example.