Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Saving 3d objects to persistent data

Discussion in 'Scripting' started by S4MA3L, Jul 24, 2020.

  1. S4MA3L

    S4MA3L

    Joined:
    Apr 17, 2020
    Posts:
    38
    I have been working on a simulation game somewhat like good game cafe. And I have been having some trouble with saving the positions of the objects in the scene to persistent data storage. Single its not possible with playerprefs, what would be the best way to go about this?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Single is certainly possible with playerprefs. You just save as a string instead. But playerprefs is generally not a good idea if you're talking about more than trivial amounts of data. I'd use your own save system. You could use one of the many JSON based serialization systems, or roll your own using your favorite text format, or even go straight binary.
     
  3. S4MA3L

    S4MA3L

    Joined:
    Apr 17, 2020
    Posts:
    38
    Thanks