- Home /
How to use line break for GUI.Lable
HI have some text for display. I used lable. But i need to display one by one how can i add line break or is i need to use separate lable for each?
GUI.Label(new Rect(10, 10, 100, 20), "Cattle are herbivores that eat vegetation such as grass Cattle stomachs have four chambers which help break down what they eat");
I need to display below:
Cattle are herbivores that eat vegetation such as grass
Cattle stomachs have four chambers which help break down what they eat
Comment
Answer by KellyThomas · Dec 30, 2013 at 10:15 AM
The new line escape code is "`\n`".
So your example would be:
GUI.Label(new Rect(10, 10, 100, 20), "Cattle are herbivores that eat vegetation such as grass\nCattle stomachs have four chambers which help break down what they eat");
Other codes are listed here.