- Home /
New line \n character is not working in GUILayout.label
I have more line to display through GUILayout.label. So i used \n character. But it's not working.
GUILayout.Label("Cattle are herbivores that eat vegetation such as grass\nCattle stomachs have four chambers which help break \ndown what they eat\nThere are well over 1 billion cattle in the world\nYoung cattle are generally known as calves\nAdult females are generally called cows\nCattle are red/green colour blind", style);
Comment
Answer by KellyThomas · Dec 30, 2013 at 03:37 PM
I suggest you check your style
.
This code:
void OnGUI() {
GUILayout.Label("Cattle are herbivores that eat vegetation such as grass\nCattle stomachs have four chambers which help break \ndown what they eat\nThere are well over 1 billion cattle in the world\nYoung cattle are generally known as calves\nAdult females are generally called cows\nCattle are red/green colour blind");
}
Produces this output:
cattle.png
(24.0 kB)
Your answer
Follow this Question
Related Questions
Gui now showing up! Nothing to do D': 0 Answers
how to accomplish:"When click a button , four button occour ." 0 Answers
[SOLVED]GUIStyle Word Wrap Check 1 Answer
Image not displaying proper 1 Answer
How to make scroll GUILayout.label 1 Answer