在Inspector中展开Unity文本窗口大小

时间:2016-06-18 05:24:32

标签: unity3d

我在检查器中有一个自定义字符串字段,我想给它一个大盒子。

目前正是这样:

enter image description here

我希望它是这样的:

enter image description here

我浏览了https://docs.unity3d.com/ScriptReference/EditorGUILayout.html,但似乎找不到任何可以增加检查员窗口大小的内容。

1 个答案:

答案 0 :(得分:1)

由于您没有提到您为自定义编辑器使用的输入字段类型而且没有提及任何代码,因此我将提供可能的解决方案。你自己解决了。

只需启用wordWrap

取决于您使用的内容:

GUI.skin.textArea.wordWrap = true;

EditorStyles.textField.wordWrap = true;

您甚至可以使用TextArea属性执行此操作。

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