I’m hoping the kind folks here can help me out with the following question.
I am using StreamWriter in a Javascript script to write a text file from Unity.
The file it writes is perfectly readable and correctly formatted when I open it in OS X but in Windows the file appears to have no line endings and everything is mashed together. I’m assuming that the StreamWriter is using non-Windows line endings (\r\n).
So, I’ve looked through the .net documentation on this and there appears to be a way to set the kind of line endings used. However, I don’t know how to translate this to Javascript.
Can anyone help?
Here is the link to the .net documentation for this and below is the C# code they recommend: TextWriter.NewLine Property (System.IO) | Microsoft Learn
public virtual string NewLine { get; set; }
Thanks very much!
– Anthony