Loading and saving files from unity.

My game is exporting text files with data created by the user for use in another program, right now it saves into whatever folder the app was run from, how do I make a prompt that lets the user specify a location to save to.

Also how do I make a prompt that allows them to select a text file to load.

You might want to check out the File Browser on the wiki page:

Just out of curiosity, how do you output text files in Unity? All I can find that is any sort of file I/O is TextAsset, and that seems to be read only…

Take a look at the System.XML.Serialization namespace.

Use StreamReader and StreamWriter, with ReadLine and WriteLine. There’s also ReadAllBytes/WriteAllBytes and others. Look in the Mono/.net docs.

–Eric

BinaryFormatter class is also rather handy, as it can Serialize Hashtables orther things that XML Serializer cannot handle.