Class TextInputField
Text input field compatible with OVRVirtualKeyboard input.
public class TextInputField : Selectable, IPointerClickHandler, OVRVirtualKeyboard.ITextHandler
- Inheritance
-
System.ObjectTextInputField
- Implements
-
IPointerClickHandlerITextHandler
Fields
OnFieldDeselected
Called when the input field has been deselected.
public UnityEvent OnFieldDeselected
Field Value
- UnityEvent
OnFieldEdited
Called when the input field has been edited.
public UnityEvent<string> OnFieldEdited
Field Value
- UnityEvent<string>
OnFieldSelected
Called when the input field has been selected.
public UnityEvent OnFieldSelected
Field Value
- UnityEvent
Properties
IsFocused
public bool IsFocused { get; }
Property Value
- bool
OnTextChanged
public Action<string> OnTextChanged { get; set; }
Property Value
- Action<string>
SubmitOnEnter
public bool SubmitOnEnter { get; set; }
Property Value
- bool
Text
The text entered by the user.
public string Text { get; }
Property Value
- string
onValueChanged
[Obsolete("Use TextInputField.OnFieldEdited instead.")]
public UnityEvent<string> onValueChanged { get; }
Property Value
- UnityEvent<string>
text
[Obsolete("Use TextInputField.Text instead.")]
public string text { get; }
Property Value
- string
Methods
AppendText(string)
public void AppendText(string addedText)
Parameters
addedText
string
ApplyBackspace()
public void ApplyBackspace()
MoveTextEnd()
public void MoveTextEnd()
OnCanvasGroupChanged()
protected override void OnCanvasGroupChanged()
OnDestroy()
protected override void OnDestroy()
OnDisable()
protected override void OnDisable()
OnPointerClick(PointerEventData)
public virtual void OnPointerClick(PointerEventData eventData)
Parameters
eventData
PointerEventData
SetText(string)
Sets the text in the field.
public void SetText(string text)
Parameters
text
stringThe new text.
SetTextWithoutNotify(string)
Sets the text in the field, without calling OnFieldEdited.
public void SetTextWithoutNotify(string text)
Parameters
text
stringThe new text.
Submit()
public void Submit()