Class InputEvent
Sends an event when text from a TextField changes.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public class InputEvent : EventBase<InputEvent>
Constructors
InputEvent()
Constructor.
Declaration
public InputEvent()
Properties
newData
The new text.
Declaration
public string newData { get; protected set; }
Property Value
Type | Description |
---|---|
String |
previousData
The text before the change occured.
Declaration
public string previousData { get; protected set; }
Property Value
Type | Description |
---|---|
String |
Methods
GetPooled(String, String)
Gets an event from the event pool and initializes it with the given values. Use this function instead of creating new events. Events obtained using this method need to be released back to the pool. You can use Dispose()
to release them.
Declaration
public static InputEvent GetPooled(string previousData, string newData)
Parameters
Type | Name | Description |
---|---|---|
String | previousData | The text before the change occured. |
String | newData | The new text. |
Returns
Type | Description |
---|---|
InputEvent | An initialized event. |
Init()
Resets the event members to their initial values.
Declaration
protected override void Init()
Overrides
UnityEngine.UIElements.EventBase<UnityEngine.UIElements.InputEvent>.Init()