My game is working properly on facebook canvas, which I am building from unity in webgl player, but I am not getting any way to store my game data anywhere. Using "Playerprefs" works, but it works only in current game session, when I reload the game, data is getting lost. I tried to use "Parse" sdk, but came to know that it does not support webgl yet. I searched a lot, but I couldn't get the answer. I am sure, there must be some way because there are webgl games available on the net. does anyone have any idea, how can this be achieved.
Asked
Active
Viewed 628 times
4

gman
- 100,619
- 31
- 269
- 393

Neeraj Kumar
- 957
- 1
- 9
- 20
-
why webgl tag is removed? is webGL different from unity webGL? – Neeraj Kumar Jul 27 '15 at 07:39
-
PlayerPrefs should work. The whole idea of PlayerPrefs is to store data between sessions. See if you're re-initializing the variables each session, or possibly even check whether it's getting saved in the first place. If it doesn't, you can always use your own server to store the data, or (if you can figure out a way to do so), use Facebook's Score API – Venkat at Axiom Studios Jul 28 '15 at 03:37
-
Did you forget a PlayerPrefs.Save() maybe? Also, look in the WebGL player settings (inside Unity) and uncheck data caching if it's checked. – Cress Jul 15 '16 at 23:03