Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. 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.