I’m using JS. I have a GUI Text that I want to display a list. I want to do something like this:
var words : GUIText;
var number1 = 20;
var number2 = 56;
var number3 = 25;
words.text = number1+"&"+number2+"&"+number3;
Instead of having “&”, I want something that will create a new line. Is there a way to do this?
Nevermind, I figured out it’s “\n”. Anyone else with a similar problem can go here:
\n is correct for UNIX based systems. For Mac, \r will work. On Windows, it’s \r\n. Actually it’s quite a mess and we have typewriters to thank.
Easiest solution is to use Environment.NewLine and let the computer figure it out.
1 Like
Mac is \n (being a UNIX-based system); it definitely does not use \r. Also \n works fine on Windows. So just use \n.
–Eric
3 Likes
Yeah, just \n is fine.
The only program I see be a wah wah about \n on its own is Notepad… and really, I haven’t used Notepad in years.