I am trying to find a way to position my layout when I am detecting a spatial anchor in my Unity-Hololens application. I am currently running quickstarts > MRTK. The app is detecting my uploaded anchor. How can I position the other objects in my scene after detection?
Asked
Active
Viewed 241 times
2 Answers
1
If you need to store some additional information related to the anchor you can use properties of CloudSpatialAnchor. Here is a link to ASA documentation related to it: CloudSpatialAnchor.AppProperties Property
It a nutshell it’s a key-value store for any data that is specific to an application. In this sample application it is used to store object shape information: CreationFragment.cs
You can store scene relative transform as a property of an anchor and then retrieve it from the cloud.

lebedev - MSFT
- 11
- 1
0
One way is to create a root object and use as a scene origin. Procedure is like:
- Create a root object in your scene and parent all the objects to this one.
- When you create ASA anchor, attach CloudNativeAnchor to this object and save it.
- In the loading scenario, you can create (or move) your root object with the position and rotation from the found ASA anchor. All the child objects will position accordingly.

Will Yeo - MSFT
- 231
- 1
- 3
- 7