- Home /
Text doesn't fit (too much to write) in TextField/TextArea and it doesn't automatically wrap. Solution
Text field which isn't that long (on the X axis) but it's deep (on Y axis). I use it to display Arrays lists. Some arrays have longer elements, some smaller.
The point is to force word wrap in the textfield/area so that the text inside it doesn't get hidden by an edge and everything is visible.
Any sugestions?
Comment
Best Answer
Answer by Mike 3 · Sep 08, 2010 at 02:31 AM
Use a GUIStyle which has wordWrap set:
http://unity3d.com/support/documentation/ScriptReference/GUIStyle-wordWrap.html
Alternatively, change the main skin to do it:
GUI.skin.textArea.wordWrap = true;
Answer by quyrean · Aug 08, 2018 at 08:54 PM
I have had luck with this:
EditorStyles.textField.wordWrap = true;