Search Unity

Can't save file

Discussion in 'Windows' started by CazicThule, Aug 23, 2013.

  1. CazicThule

    CazicThule

    Joined:
    Nov 29, 2012
    Posts:
    95
    Here's how I usually save files

    PHP:
    using (StreamWriter writer = new StreamWriter(GetDocumentsPath()+"/"+filename))
    {
        
    writer.Write("foo");
    }
            
    But yet again this code doesn't seem to be supported in Windows 8. Does anyone know a way to do this?

    EDIT: It seems FileStream is supported in Windows Phone 8, but not Windows Store.
     
    Last edited: Aug 24, 2013
  2. moyesjack

    moyesjack

    Joined:
    Aug 22, 2013
    Posts:
    11
    May I know are you talking about xml files.? if you are talking about xml then I can help you may be. So please let me know that, and also let me know your exact query. So this is my reverse question to you. ;) Hope you don't mind. :)
     
  3. CazicThule

    CazicThule

    Joined:
    Nov 29, 2012
    Posts:
    95
    I'm just trying to save a simple text file, but if there's an easy way of doing it with xml files I'm willing to consider that too. There should be a way of saving a text file in Windows 8, however.
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,917
    How about using PlayerPrefs for that?
     
  5. CazicThule

    CazicThule

    Joined:
    Nov 29, 2012
    Posts:
    95
    I need to store level information which could be several mb in size
     
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,917
  7. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822