- Home /
Question by
popcar2 · Sep 06, 2020 at 10:37 AM ·
guilayouteditorguilayouttextarea
How can I fix EditorGUILayout.TextArea not having word wrap?
My EditorGUILayout.TextArea doesn't have word wrap or increase height automatically whenever I reach the end of its width. I'm trying to mimic the [TextArea] attribute using a textarea but for some reason it doesn't work.
I've tried:
GUI.skin.textArea.wordWrap = true;
GUI.skin.textArea.stretchHeight = true;
And also adding GUILayout.ExpandHeight(true) to the text area. Didn't work. Any help would be appreciated.
Comment
Answer by BenWiller1989 · Sep 06, 2020 at 11:12 AM
I used GUILayout.Label ("My text :"); text = GUILayout.TextArea (text);
And it works perfectly! If EditorGUILayout doesnt work, try GUILayout.