Search Unity

Save AR object transform to file or database?

Discussion in 'AR/VR (XR) Discussion' started by mistergreen2016, Oct 6, 2019.

  1. mistergreen2016

    mistergreen2016

    Joined:
    Dec 4, 2016
    Posts:
    226
    Is there a tutorial on saving a placed AR object's transform to file or database?

    Basically I'm looking for a way to place models around in a space and save it so the next/new session, or another person to view the models and their placements.

    So I'm guessing using GPS & wifi for placements. I know that method isn't entirely precise, it could be a meter off in placement. I'm also thinking of using image tracking as object placement for precise placements. The images would be taken during run time and not preset in a reference library.

    Thanks.
     
    Last edited: Oct 6, 2019
  2. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    Where do you want to store it? :D Locally or on a server? Or just send it to a person in the same room?
    Locally you can just do something with this https://docs.unity3d.com/ScriptReference/PlayerPrefs.Save.html
    For a server, I've been trying Azure Storage and found that they have a unity plugin that makes it quite easy to store some data on a server.
    For the last option, you need some multiplayer system. I found Photon very easy to implement and use.
     
  3. mistergreen2016

    mistergreen2016

    Joined:
    Dec 4, 2016
    Posts:
    226
    Thanks.