How to display a paragraph of 3D Text.

Is there a way to put linebreaks in the text mesh text field of a 3D Text GameObject? And besides using some asses like NGUI, what is the best way to display a paragraph of text?

I can answer your first question. Use \n wherever you want a line break in your text.

Thanks Munchy2007. I know about \n in strings in Debug.Log statements. But I when I directly type it into a text property or text field, it is also displayed as literal text. eg. Line1\nLine2 is displayed as:

Line1\nLine2

But I found that alt+return works perfectly. e.g Line1<alt+ret>Line2:

Line1
Line2

It is even displayed with LF+CR in the 3D Text Object Text property although it is hard to see in that little one-line box.

I meant to use the \n in a string variable rather than typing it into a text field in the inspector, as I wasn’t aware of the alt+return trick, so that’s very handy to know. Thanks for that :slight_smile: