Help me with this and I will love you forever.
When I make a multiline textarea like this…
var stringToEdit : String = "Hello World\nI've got 2 lines...";
function OnGUI ()
{
stringToEdit = GUI.TextArea (Rect (10, 10, 200, 100), stringToEdit, 200);
}
…it works perfectly. (Well, of course it does, since it is straight copy and paste from the documentation).
- But when I add a style like this…
var stringToEdit : String = "Hello World\nI've got 2 lines...";
var someStyle : GUIStyle;
function OnGUI ()
{
stringToEdit = GUI.TextArea (Rect (10, 10, 200, 100), stringToEdit, 200, someStyle);
}
…you can no longer use Enter/Return to make a new line break. I tried changing each style property at a time, but none seems to make it work. Can someone please help me?