Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TextAreaAttribute

Attribute to make a string be edited with a height-flexible and scrollable text area.
Read time 4 minutesLast updated 4 days ago

Definition

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, Inherited = true, AllowMultiple = false)]public sealed class TextAreaAttribute : PropertyAttribute

Remarks

You can specify the minimum and maximum lines for the TextArea, and the field will expand according to the size of the text. A scrollbar will appear if the text is bigger than the area available.
Note: The maximum lines refers to the maximum size of the TextArea. There is no maximum to the number of lines entered by the user.
TextAreaAttribute (TextAreaAttribute)
Text Area in Inspector.

Examples

using UnityEngine;public class NewMonoBehaviourScript : MonoBehaviour{ [TextAreaAttribute(2, 10)] public string MyTextArea;}

Fields

Value

Description

maxLinesThe maximum amount of lines the text area can show before it starts using a scrollbar.
minLinesThe minimum amount of lines the text area will use.

Constructors

Constructor

Description

TextAreaAttribute()Attribute to make a string be edited with a height-flexible and scrollable text area.
TextAreaAttribute(System.Int32,System.Int32)Attribute to make a string be edited with a height-flexible and scrollable text area.

Inheritance

Inherited Members