TextAreaAttribute

class in UnityEngine

/

Inherits from:PropertyAttribute

Switch to Manual

Description

属性,用于通过高度灵活且可滚动的区域编辑字符串。

您可以指定 TextArea 的最小行数和最大行数,该字段将根据文本的大小进行扩展。如果文本大于可用区域,则会显示滚动条。

注意:最大行数指的是 TextArea 的最大大小。用户输入的行数没有最大值。


Text Area in Inspector.

using UnityEngine;

public class TextAreaExample : MonoBehaviour { [TextArea] public string MyTextArea; }

Variables

maxLines文本区域在开始使用滚动条前可显示的最大行数。
minLines文本区域将使用的最小行数。

Constructors

TextAreaAttribute属性,用于通过高度灵活且可滚动的区域编辑字符串。

Inherited members

Variables

order可选字段,用于指定多个 DecorationDrawer 应采用的绘制顺序。