WebPlayer save scores of different players

Hello!

I know that I need to user PlayerPrefs to save scores and get them when I launch again this game. However, I know that WebPlayer can be accessed by more than one player.

Is PlayerPrefs is smart enough to know for which it belongs or I need to save it in some kind of file?

This game does not need any login and password, then what I need to do to identify players that played my game? (I do not want to users to eneter their names. They can see scores only belong to them)

1 Answer

1

As long as you assume they are not moving computers you should be fine:

From PlayerPrefs docs:

On Web players, PlayerPrefs are stored in binary files in the following locations:

Mac OS X: ~/Library/Preferences/Unity/WebPlayerPrefs

Windows: %APPDATA%\Unity\WebPlayerPrefs

This will work even when this game placed in server and every player will got its own playerprefs?

–

yes, the player preferences are stored on the client's machine that is running the installed unity plugin in their respective browser. Your webplayer is downloaded to the clients computers to run in the unity player.

–

That is great! Thank you.

–