I'm trying to develop an app for the Hololens 1 using Unity. What I want to archive is providing a pre-designed experience to users for a specific room (like a specific room in a museum).
My idea is, that I scan the room with the Hololens, using the scanned mesh in Unity to place the virtual content (using the scan mesh to place the content at the correct position in the room) and then build the app and deploy it to the device. The goal is, that I can give a visitor of the museum the Hololens, he can go to this room, start the app in the room (everywhere in the room) and see the virtual objects on the right places (for example a specific exhibit, the door to the next room, in the middle of the room or....). I don't want to have the visitor place objects by himself and I don't want the staff to do this in advance (before handing out the headset). I want to design the complete experience in Unity for one specific room.
Everytime I am searching for use cases like this I didn't really find a starting point. Somehow the app has to recognize the position of the headset in the room (or find pre-set anchors or something like this).
I really thought this might be a very basic use case for the hololens.
Is there a way to achieve this goal? Later I want to design multiple experiences for all the rooms of the museum (maybe a separate app for every room).
I think I have to find pre set anchors in this room and then placing the content relative to it. But how is it possible to define this anchor and ensure that every visitor finds it so that the virtual content appears on the corresponding real world object?
You should start with Spatial Anchor technology. Spatial Anchor can help you lock the GameObject in a place to locations in the real world based on the system’s understanding. Please refer this link for more information:Spatial anchors. And then, you need persisting local Spatial Anchor in the real-world, this documentation show how to persist the location of WorldAnchor's across sessions with WorldAnchorStore class:Persistence in Unity. If you also want to share experiences with multiple customer to collectively view or interact with the same hologram which is positioned at a fixed point in space. You need to export an anchor from one device and import it by a second HoloLens device, please follow this guide:Local anchor transfers in Unity
Besides, in situations where you can use Azure Spatial Anchors we strongly recommend you to use it. Azure Spatial Anchors provides convenience for sharing experiences across sessions and devices, you can quick-start with this:How to create and locate anchors using Azure Spatial Anchors in Unity