Hello,
I’d like to add highscore feature to my web player game. What is the effective way of storing and displaying player’s highscores for browser games?
I am using an object (it’s not being destroyed between scenes) called Game Data, with GameData C# script that stores public int variable “totalScore”.
If you want to save it locally, the easiest way is to use PlayerPrefs. If you want to do it somehow else, I guess you could talk to the browser if you have a method of handling the response etc. I don’t know what can be done in js on the browser, but that is pretty much your only other option.
If you want to save it remotely, you need a web service to handle your request and setup a cross domain policy if it’s located on a different domain. Example on how to communicate with the server is found here.
Did you manage to save the highscore on web player with PlayerPrefs.
I read some documentation but i’m having trubble to wrap my head around what needs to be done to make it work :-/
@pdenton