Aggressor
Aggressor

Reputation: 13551

Expand Unity Text Window Size In Inspector

I have a custom string field in the inspector and I want to give it a large box.

Currently its this:

enter image description here

and I want it to be this:

enter image description here

I looked through https://docs.unity3d.com/ScriptReference/EditorGUILayout.html but didn't seem to find anything that increases inspector window size.

Upvotes: 1

Views: 3240

Answers (1)

Programmer
Programmer

Reputation: 125275

Since you didn't mention what type of Input field you are using for the custom Editor and no code at-all, I will provide the possible solution. You sort it out yourself.

Simply enable wordWrap.

Depending on what you are using:

GUI.skin.textArea.wordWrap = true;

or

EditorStyles.textField.wordWrap = true;

You can even do this with the TextArea attribute.

 [TextArea(3,10)]
 public string text = "blah blah blah";

Upvotes: 3

Related Questions