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.

Keeping object coordinates stored after scene restart


I have the following setup:

  • Spatial Mapping and all other managers are loaded from in a "setup" scene together with DontDestroyOnLoad()
  • Main scene where an object appears at a specific position.

At the end of the scene the following should happen:

  • Store position of object (Object needs to reset itself so I can't use DontDestroyOnLoad())
  • Restart scene
  • Apply old positions of object
  • Object should move to corresponding position

What happens after the restart:

  • Object move somewhere else

All spatial mappings and other manages are loaded in a different "setup" scene and kept in memory via DontDestroyOnLoad()

What should I do to prevent this and that I can place the object at the proper position after the scene restart?

Best Answer


Sign In or Register to comment.