performance wise, which is better..Playerprefs or global floats

hi huys, im working on scores for each of my levels and im just wondering which is better performance wise.

i need to store different score limits for each level and not sure the most efficient way to go about it

Global floats is better performance wise, but PlayerPrefs can store your scores between playsessions. So it all depends on if you want the scores to be saved for next time or reset.

If you want the scores to persists through levels or full closures of the app, PlayerPrefs is the way to go. It honestly utilizes minimal resources (iOS/Android/PS/Xbox/etc)
PlayerPrefs is a quick write to a text file (or flat file database) - like i said negligible given today’s hardware.
Depending on how much info you want to save and your familiarity with SQL you could use SQLite - a simple .NET .dll you add you your Assets/Plugins folder and then you have a full database at your disposal.

:slight_smile:
/julian

well i will have playerprefs for the score as i need to look back at it after re openeing the game. but the ones in question will be onlu used for reading, never written to. as the hold the score’s Target, which will be used as a reference in order to calculate how many stars to give to a player.
e.g if players scores 10 in level 1, and the target for that level is 20, the player will only get 50% marked on screen.