Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

User data and online portals

Discussion in 'Editor & General Support' started by Jonathan Czeck, Sep 10, 2007.

  1. Jonathan Czeck

    Jonathan Czeck

    Mar 17, 2005
    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.

  2. MatthewW


    Nov 30, 2006
  3. launchpad


    Aug 17, 2007
    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.


  4. MatthewW


    Nov 30, 2006
    That won't work in a deployed web player...