- Home /
[PlayerPrefsSet...] VS [var=...] at every value update
I understand that using PlayerPrefs to set data values is not slow, even when done for lots of different data at once, but still I would like to know if it's better:
1) updating e.g. the total tokens collected in all the player's history (I display that in a "general info" panel) every time a token is collected by updating a local variable's value and at the end of each game update the respective PlayerPrefs value
vs
2) updating the PlayerPrefs' value each time a token is collected, without using a local variable (like: "totalTokensCollected: int")
or if it doesn't make any noticeable difference?
Thanks for reading :-)
Your answer
![](https://koobas.hobune.stream/wayback/20220613075909im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
GUI.TextField problem, won't update var. 0 Answers
Real-Time Consumable tracking 0 Answers
Random value for if statement 2 Answers
PlayerPrefs Deleted when Updating Game (Windows Phone) 1 Answer
how much CPU do codes inside the update function use? 1 Answer