TextField
A TextField accepts and displays text input. For more information, refer to UXML element TextField.
Read time 8 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: TextInputBaseField<string>
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IBindable, INotifyValueChanged<string>, IMixedValueSupport
public class TextField : TextInputBaseField<string>, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IBindable, INotifyValueChanged<string>, IMixedValueSupport
Static Fields
Value | Description |
|---|---|
| inputUssClassName | USS class name of input elements in elements of this type. |
| labelUssClassName | USS class name of labels in elements of this type. |
| ussClassName | USS class name of elements of this type. |
Constructors
Constructor | Description |
|---|---|
| TextField() | Creates a new textfield. |
| TextField(System.Int32,System.Boolean,System.Boolean,System.Char) | Creates a new textfield. |
| TextField(System.String) | Creates a new textfield. |
| TextField(System.String,System.Int32,System.Boolean,System.Boolean,System.Char) | Creates a new textfield. |
Properties
Property | Description |
|---|---|
| multiline | Set this to true to allow multiple lines in the textfield and false if otherwise. |
| value | The string currently being exposed by the field. |