Write a line break in the editor?


is it possible to write a line break as the value of a public string variable?

At the moment I work with the following line at Awake (C#).

myText = myText.Replace("#", "\n");

It would be nice, if I could directly write line breaks in the editor and don't have to replace special chars at runtime.

Ok there is a simple way to do this. I just have to write the text with line breaks in a text editor and copy it into the field for the variable value.

If you want to do it directly in Unity, use option-return.


Ok, thank you.

Unfortunately I don't work on a Mac at the moment. :)

Is there also a shortcut on a Windows PC?

option = alt


I know :)

Forgot to say that alt-return doesn't work in Unity.