• 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
2
Question by hirenkacha · Jun 28, 2012 at 12:10 PM · playerprefs

Maximum Number of PlayerPrefs

Is it ok to use more than 50 PlayerPrefs.setInt in single Android game? Will it affect the game performance?

Comment
Add comment · Show 1
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 Eric5h5 · Jun 28, 2012 at 12:12 PM 3
Share

If you're storing an array, have a look at ArrayPrefs2.

1 Reply

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

Answer by flamy · Jun 28, 2012 at 12:28 PM

First of all there is no limit with number of PlayerPrefs in ANY platforms. But there is a limit of 1 MB in Web player build. Other than that there aint any limit with number of or size of PlayerPrefs.

Generally PlayerPrefs are a bit slow (esp while saving it!) So i always prefer handling it in Start() and OnApplicationQuit() functions. And never prefer to save it in Update or OnGUI or any other function that gets called every frame.

And if it is array go with ArrayPrefs2, that would be better!. IDK about change in performance with number of prefs., And even if there is any i dont think it would be some huge impact. Because in one of my games, i have handled over 300 mb of playerprefs and i didnt find a difference, it was for iOS and android.

Comment
Add comment · Show 1 · 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 hirenkacha · Jun 29, 2012 at 09:15 AM 2
Share

Thanks for the answer @vijayakumar

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Where on iPhone editor are playerprefs stored. 1 Answer

PlayerPrefs.DeleteAll not working 1 Answer

PlayerPrefs saving 1 Answer

Guide in ArrayPrefs or PlayerPrefx? 1 Answer

Are PlayerPrefs the same on iPhone compared to my computer? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges