Can Unity webplayers save data to the user's local PC, in the same way that Flash SWFs can save data using the actionscript "sharedObject" class, and that browser-based javascript can save data using cookies?
(the functions used to do this in Unity have been mentioned in a number of other answers on this site, but not specifically in the context of their equivalence to the Flash and Browser cookie functions used to save data).
Yes, web-based Unity content can save data to the local machine using the PlayerPrefs class. Each webplayer url can save up 1 megabyte of data, consisting of either ints, floats or strings. For example:
// to save an integer value
PlayerPrefs.SetInt("Player Score", 10);
// to retrieve the integer value
print (PlayerPrefs.GetInt("Player Score"));
And the commands are very similar for floats and strings:
PlayerPrefs.SetFloat("Player Lap Time", 29.3);
print (PlayerPrefs.GetFloat("Player Lap Time"));
PlayerPrefs.SetString("Player Name", "Duck");
print ("Welcome back, " + PlayerPrefs.GetString("Player Name") + "!");