PlayerPrefs - Error in webplayer

Hi all,

I am trying to store some data using PlayerPrefs, in order to be used in the following runnings of the app. Well, if I use PC standalone in windows, it works perfectly. Thus, The first time I run the application, Playerprefs stores the data; and the followings the stored data are loaded perfectly.

The problem is that, when I use the webplayer for doing the same. It seems like the data are stored correctly, but Playerprefs does not load the data as expected. The code is the following (both standalone windows and webplayer):

Code for storing the data:

//Stores int
int n = 10;
PlayerPrefs.SetInt("selected_num",n);

//Stores two strings	
string cc = "10-20-30-40"; 
PlayerPrefs.SetString("selected_for_classification",cc);
	
string dd = "4-66-3;5-6-7"
PlayerPrefs.SetString("selected_for_distances",dd);

Code for reading the data:

//We read the stored information
int n_readed = PlayerPrefs.GetInt("selected_num");
		
string classif = PlayerPrefs.GetString("selected_for_classification");
		
string distances =	 PlayerPrefs.GetString("selected_for_distances");

The error in webplayer is like it does not read well the stored data.
Do you know what is happening? Please, I need help :).

Thank you very much in advance

That will not work 7toni7. PlayerPref’s are based on each individual URL, you can not access them like that, what you’ll need is a server side database that each of the different games talk to if you want to provide data across the platforms.