- Home /
Question by
Mossey · Dec 11, 2013 at 10:53 AM ·
inspectorguitextpublic variablenewline
GUIText new line through inspector
I know that in scripts you can go to new line in GUIText by typing in slash n.
What if I pass a String as a parameter to my script through inspector? I tried to put in the slash n in middle of my public var of type String - it doesn't work. Is there any way around it?
public var objectiveDescription : String;
private var description : GameObject;
// Some code later...
description = new GameObject();
description.AddComponent(GUIText);
description.guiText.text = objectiveDescription;
Comment
Best Answer
Answer by tanoshimi · Dec 11, 2013 at 11:08 AM
You can't manually type a newline character, but you can type multiline text in, say, Notepad, and then copy and paste it in.