Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by InfiniBuzz · Jun 12, 2013 at 09:41 PM · playerprefssavingdata

Efficient data saving? PlayerPrefs vs. XMLSerialization

Hi

I know this subject is highly depending on the individual needs and setups. But I'm wondering what would be the best way of saving data. I couldn't find anything really useful yet.

What method is better in performance? (also considering mobile platforms)

I know there may be no general answer to this so I will need to save about 10 to 50 object positions and a few other variables.

Can someone recommend me one of the methods? I'm quiet familiar with XMLSerializing however I didn't use it in unity and don't know how performance is and what needs to be considered here, and I'm interested in finding the best possible way :)

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image InfiniBuzz · Jun 28, 2013 at 11:41 AM 0
Share

here too, thanks for downvoting without a comment

avatar image Fattie · Jun 28, 2013 at 11:43 AM 0
Share

who the hell downvoted this ??

perhaps someone just clicked the wrong button - don't worry

1 Reply

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Fattie · Jun 13, 2013 at 08:00 AM

Hello!

A - check out Unity Serializer (by Whydoidoit, a top unity dev). it is free and very widely used in almost every project

B - FTR you can't use PlayerPrefs in the real world because it's not encrypted or obfuscated. it's only for demos and learning. you'd have to use Secured PlayerPrefs (works identically) from the asset store, or, write your own

C - note that Eric5h5 has the excellent array prefs system which may make your life easier. Very cleverly, the "Secured PlayerPrefs" guy included an array feature, so if you do use "Secured PlayerPrefs" your job is totally done if you want an array as well

D - 50 items is zero so forget performance aspects. there are absolutely no performance considerations here in any way. (Note that you'd just be keeping your 50 positions in a simple List during play, and from time to time you'd save it. there's no performance aspect.)

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image InfiniBuzz · Jun 13, 2013 at 08:23 AM 1
Share

Thanks for answering my questions. I've seen the Asset from whydoidoit, I have to test how it affects the game size. But I think I'll stick to that one.

avatar image Fattie · Jun 13, 2013 at 08:39 AM 1
Share

here to serve! :) yeah unity serializer is amazing

there's no reason you can't simply use PlayerPrefs to get you going. enjoy!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Saving public variable data set in inspector? 1 Answer

How to create a save and load game proccess like SCP: Containment Breach? 0 Answers

Save Values On Closing of Game 1 Answer

How to save Coins,PlayerLevel,Player Exp and load it automaticly 0 Answers

Saving Location in Unity 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges