Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

How do you actually SaveAnchors and LoadAnchors

Hey guys,
how can you access SaveAnchors and LoadAnchors to a button, I went through the updated script and have no clue how to save anchor such as if I am going to see my holograms at the same spot after closing/reopening applications.

Also when is Microsoft ever going to show a video tutorial on how to use WorldAnchorStore

Answers

  • james_ashleyjames_ashley ✭✭✭✭

    @ChrisSzkoda,

    If you have an MRTK WorldAnchorManager in your scene, it should be pretty easy. Call WorldAnchorManager.Instance.AttachAnchor(gameObject) to store the object's location. If the object moves, you'll need to remove the anchor and reattach it when it is fixed again. Everything else should be automagical and the object's location will be remembered by the WorldAnchorManager between closing and reopening your app.

    James

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • Does it save the 3D Objects as well as the WorldAnchor location? because we have attached the WorldAnchorManager to a gameobject but everytime we close and open, the gameobject moved from its previous location.

  • james_ashleyjames_ashley ✭✭✭✭

    It uses the gameobject name to automatically reattach the anchor for you, which then places the gameobject. Do you have PersistentAnchors flag checked in your WorldAnchorManager?

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • Don't attach the WorldAnchorManager to game objects you need to anchor. Add it to a separate empty object that will always be in your scene. The game object maybe moving cause the WorldAnchorManager itself is getting enabled and disabled. You shouldn't do that.
Sign In or Register to comment.