I want to create a method of recording what is happening in my drum game, like a midi file where every time a certain drum is played the time it has been played is recorded to a text file in real time and then read back. The problem I have is adding a new line without overwriting the entire file. In Response to the answers, I tried,
import System.IO;
var sw = new StreamWriter("TestFile.txt");
function Start () {
}
function Update () {
if (Input.GetButtonDown("keyOne")) {
sw.WriteLine(Time.time);
}
if (Input.GetButtonDown("keyTwo")) {
sw.Close();
}
}
But nothing was written at all? And Erics answer, how do you use the append option? Sorry about this but i can't seem to find any IO documentation using JS. :'(