Unity3D Game Engine – GUI Text – New Line Break
New Line Break inside Inspector
1. MAIN TOP MENU> GameObject> Create Other> GUI Text
2. Open Windows Note Pad> Type your text and indent it> select it and press CTRL+C (Copy)
3. Hierarchy> select GUI Text> Inspector> GUIText> Text slot, CTRL+V (Paste)
New Line Break via JS Script
1. MAIN TOP MENU> GameObject> Create Other> GUI Text
2. Hierarchy> select GUI Text> Inspector> ‘Add Component’> New Script> MyText.JS
#pragma strict function Start () { } function Update () { guiText.text = "This is a \n line break"; }
Other supported characters:
\n New line \t Tab \v Vertical Tab \b Backspace \r Carriage return \f Formfeed \\ Backslash \' Single quotation mark \" Double quotation mark \d Octal \xd Hexadecimal \ud Unicode character