User data and online portals

Good current web games save user data between sessions. How these games implement it is by having preferences saved on the user account's hard drive preferences. They seem to be going through Flash to do this with their .sol files.

The only Unity way currently is to use cookies and have the data saved on the server somewhere. This is certainly possible technically, but it's still no good, as from all I know major web game portals will not host/allow these kind of servers. The only exception seems to be high scores. Please correct me if I'm wrong, there, as that'd make life much easier. :)

So the only way to save data right now is to communicate from Unity to Flash to their local preferences system saved on the hard drive. Am I missing something, here? Does anyone know how much a Flash .sol file can store? Browser cookies can do 4096 bytes of text. That's enough for some ideas, but not for others. We just need a little bit more than that if we were to do some of those ideas. Maybe 10-20k with as much compression as I can do.

We have so many cool ideas that we want to implement in the future, but this has been a stumbling block, that might not exist with Shockwave games. (Of course it has plenty of stumbling blocks not in the same universe as Unity.)

Does anyone have any thoughts? Yep, that was a rant.


My Flash install shows 100kb for storage per website. I don't recall changing this so that's probably default. You can check it here:

The slider above is actually nonlinear. It goes: 10k, 100k, 1MB, 10MB.

Personally I would love a more robust PlayerPrefs class in Unity. Something along the lines of the SharedObject stuff in Flash would be great.

Am I to understand that you want a web only solution to your file saving?

You could always use the .net scripting to save the data to the local drive.

Eric suggested to me:

import System.IO;

function Start() {
var sr = new StreamReader("someFile");
var line = sr.ReadLine();
while (line != null) {
// etc.

I am able to write and read data happily from the hard drive using equivalent systems without going through flash.

Let me know if I am on track and if you require more info.



That won't work in a deployed web player...