Show / Hide Table of Contents

Class TMP_InputField

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
UIBehaviour
Selectable
TMP_InputField
Implements
IMoveHandler
IPointerDownHandler
IPointerUpHandler
IPointerEnterHandler
IPointerExitHandler
ISelectHandler
IDeselectHandler
IUpdateSelectedHandler
IBeginDragHandler
IDragHandler
IEndDragHandler
IPointerClickHandler
ISubmitHandler
ICanvasElement
IScrollHandler
IEventSystemHandler
Inherited Members
Selectable.s_Selectables
Selectable.s_SelectableCount
Selectable.m_CurrentIndex
Selectable.AllSelectablesNoAlloc(Selectable[])
Selectable.Awake()
Selectable.OnCanvasGroupChanged()
Selectable.IsInteractable()
Selectable.OnDidApplyAnimationProperties()
Selectable.OnTransformParentChanged()
Selectable.OnValidate()
Selectable.Reset()
Selectable.InstantClearState()
Selectable.FindSelectable(Vector3)
Selectable.FindSelectableOnLeft()
Selectable.FindSelectableOnRight()
Selectable.FindSelectableOnUp()
Selectable.FindSelectableOnDown()
Selectable.OnMove(AxisEventData)
Selectable.IsHighlighted()
Selectable.IsPressed()
Selectable.OnPointerUp(PointerEventData)
Selectable.OnPointerEnter(PointerEventData)
Selectable.OnPointerExit(PointerEventData)
Selectable.Select()
Selectable.allSelectablesArray
Selectable.allSelectableCount
Selectable.allSelectables
Selectable.navigation
Selectable.transition
Selectable.colors
Selectable.spriteState
Selectable.animationTriggers
Selectable.targetGraphic
Selectable.interactable
Selectable.image
Selectable.animator
Selectable.currentSelectionState
UIBehaviour.Start()
UIBehaviour.OnDestroy()
UIBehaviour.IsActive()
UIBehaviour.OnRectTransformDimensionsChange()
UIBehaviour.OnBeforeTransformParentChanged()
UIBehaviour.OnCanvasHierarchyChanged()
UIBehaviour.IsDestroyed()
Namespace: TMPro
Assembly: HollowKnight.dll
Syntax
[AddComponentMenu("UI/TextMeshPro - Input Field", 11)]
public class TMP_InputField : Selectable, IMoveHandler, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler, IUpdateSelectedHandler, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerClickHandler, ISubmitHandler, ICanvasElement, IScrollHandler, IEventSystemHandler

Constructors

| Edit this page View Source

TMP_InputField()

Declaration
protected TMP_InputField()

Fields

| Edit this page View Source

m_CaretPosition

Declaration
protected int m_CaretPosition
Field Value
Type Description
int
| Edit this page View Source

m_CaretSelectPosition

Declaration
protected int m_CaretSelectPosition
Field Value
Type Description
int
| Edit this page View Source

m_CaretVisible

Declaration
protected bool m_CaretVisible
Field Value
Type Description
bool
| Edit this page View Source

m_CursorVerts

Declaration
protected UIVertex[] m_CursorVerts
Field Value
Type Description
UIVertex[]
| Edit this page View Source

m_GlobalFontAsset

Declaration
[SerializeField]
protected TMP_FontAsset m_GlobalFontAsset
Field Value
Type Description
TMP_FontAsset
| Edit this page View Source

m_InputValidator

Declaration
[SerializeField]
protected TMP_InputValidator m_InputValidator
Field Value
Type Description
TMP_InputValidator
| Edit this page View Source

m_Keyboard

Declaration
protected TouchScreenKeyboard m_Keyboard
Field Value
Type Description
TouchScreenKeyboard
| Edit this page View Source

m_Mesh

Declaration
[NonSerialized]
protected Mesh m_Mesh
Field Value
Type Description
Mesh
| Edit this page View Source

m_OnFocusSelectAll

Declaration
[SerializeField]
protected bool m_OnFocusSelectAll
Field Value
Type Description
bool
| Edit this page View Source

m_Placeholder

Declaration
[SerializeField]
protected Graphic m_Placeholder
Field Value
Type Description
Graphic
| Edit this page View Source

m_ResetOnDeActivation

Declaration
[SerializeField]
protected bool m_ResetOnDeActivation
Field Value
Type Description
bool
| Edit this page View Source

m_ScrollSensitivity

Declaration
[SerializeField]
protected float m_ScrollSensitivity
Field Value
Type Description
float
| Edit this page View Source

m_StringPosition

Declaration
protected int m_StringPosition
Field Value
Type Description
int
| Edit this page View Source

m_StringSelectPosition

Declaration
protected int m_StringSelectPosition
Field Value
Type Description
int
| Edit this page View Source

m_Text

Declaration
[SerializeField]
protected string m_Text
Field Value
Type Description
string
| Edit this page View Source

m_TextComponent

Declaration
[SerializeField]
protected TMP_Text m_TextComponent
Field Value
Type Description
TMP_Text
| Edit this page View Source

m_TextComponentRectTransform

Declaration
protected RectTransform m_TextComponentRectTransform
Field Value
Type Description
RectTransform
| Edit this page View Source

m_TextViewport

Declaration
[SerializeField]
protected RectTransform m_TextViewport
Field Value
Type Description
RectTransform
| Edit this page View Source

m_VerticalScrollbar

Declaration
[SerializeField]
protected Scrollbar m_VerticalScrollbar
Field Value
Type Description
Scrollbar
| Edit this page View Source

m_VerticalScrollbarEventHandler

Declaration
[SerializeField]
protected TMP_ScrollbarEventHandler m_VerticalScrollbarEventHandler
Field Value
Type Description
TMP_ScrollbarEventHandler
| Edit this page View Source

m_isRichTextEditingAllowed

Declaration
[SerializeField]
protected bool m_isRichTextEditingAllowed
Field Value
Type Description
bool
| Edit this page View Source

m_isSelectAll

Declaration
protected bool m_isSelectAll
Field Value
Type Description
bool

Properties

| Edit this page View Source

asteriskChar

Declaration
public char asteriskChar { get; set; }
Property Value
Type Description
char
| Edit this page View Source

caretBlinkRate

Declaration
public float caretBlinkRate { get; set; }
Property Value
Type Description
float
| Edit this page View Source

caretColor

Declaration
public Color caretColor { get; set; }
Property Value
Type Description
Color
| Edit this page View Source

caretPosition

Declaration
public int caretPosition { get; set; }
Property Value
Type Description
int
| Edit this page View Source

caretPositionInternal

Declaration
protected int caretPositionInternal { get; set; }
Property Value
Type Description
int
| Edit this page View Source

caretSelectPositionInternal

Declaration
protected int caretSelectPositionInternal { get; set; }
Property Value
Type Description
int
| Edit this page View Source

caretWidth

Declaration
public int caretWidth { get; set; }
Property Value
Type Description
int
| Edit this page View Source

characterLimit

Declaration
public int characterLimit { get; set; }
Property Value
Type Description
int
| Edit this page View Source

characterValidation

Declaration
public TMP_InputField.CharacterValidation characterValidation { get; set; }
Property Value
Type Description
TMP_InputField.CharacterValidation
| Edit this page View Source

contentType

Declaration
public TMP_InputField.ContentType contentType { get; set; }
Property Value
Type Description
TMP_InputField.ContentType
| Edit this page View Source

customCaretColor

Declaration
public bool customCaretColor { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

fontAsset

Declaration
public TMP_FontAsset fontAsset { get; set; }
Property Value
Type Description
TMP_FontAsset
| Edit this page View Source

inputType

Declaration
public TMP_InputField.InputType inputType { get; set; }
Property Value
Type Description
TMP_InputField.InputType
| Edit this page View Source

inputValidator

Declaration
public TMP_InputValidator inputValidator { get; set; }
Property Value
Type Description
TMP_InputValidator
| Edit this page View Source

isFocused

Declaration
public bool isFocused { get; }
Property Value
Type Description
bool
| Edit this page View Source

isRichTextEditingAllowed

Declaration
public bool isRichTextEditingAllowed { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

keyboardType

Declaration
public TouchScreenKeyboardType keyboardType { get; set; }
Property Value
Type Description
TouchScreenKeyboardType
| Edit this page View Source

lineType

Declaration
public TMP_InputField.LineType lineType { get; set; }
Property Value
Type Description
TMP_InputField.LineType
| Edit this page View Source

mesh

Declaration
protected Mesh mesh { get; }
Property Value
Type Description
Mesh
| Edit this page View Source

multiLine

Declaration
public bool multiLine { get; }
Property Value
Type Description
bool
| Edit this page View Source

onDeselect

Declaration
public TMP_InputField.SelectionEvent onDeselect { get; set; }
Property Value
Type Description
TMP_InputField.SelectionEvent
| Edit this page View Source

onEndEdit

Declaration
public TMP_InputField.SubmitEvent onEndEdit { get; set; }
Property Value
Type Description
TMP_InputField.SubmitEvent
| Edit this page View Source

onEndTextSelection

Declaration
public TMP_InputField.TextSelectionEvent onEndTextSelection { get; set; }
Property Value
Type Description
TMP_InputField.TextSelectionEvent
| Edit this page View Source

onFocusSelectAll

Declaration
public bool onFocusSelectAll { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

onSelect

Declaration
public TMP_InputField.SelectionEvent onSelect { get; set; }
Property Value
Type Description
TMP_InputField.SelectionEvent
| Edit this page View Source

onSubmit

Declaration
public TMP_InputField.SubmitEvent onSubmit { get; set; }
Property Value
Type Description
TMP_InputField.SubmitEvent
| Edit this page View Source

onTextSelection

Declaration
public TMP_InputField.TextSelectionEvent onTextSelection { get; set; }
Property Value
Type Description
TMP_InputField.TextSelectionEvent
| Edit this page View Source

onValidateInput

Declaration
public TMP_InputField.OnValidateInput onValidateInput { get; set; }
Property Value
Type Description
TMP_InputField.OnValidateInput
| Edit this page View Source

onValueChanged

Declaration
public TMP_InputField.OnChangeEvent onValueChanged { get; set; }
Property Value
Type Description
TMP_InputField.OnChangeEvent
| Edit this page View Source

placeholder

Declaration
public Graphic placeholder { get; set; }
Property Value
Type Description
Graphic
| Edit this page View Source

pointSize

Declaration
public float pointSize { get; set; }
Property Value
Type Description
float
| Edit this page View Source

readOnly

Declaration
public bool readOnly { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

resetOnDeActivation

Declaration
public bool resetOnDeActivation { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

restoreOriginalTextOnEscape

Declaration
public bool restoreOriginalTextOnEscape { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

richText

Declaration
public bool richText { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

scrollSensitivity

Declaration
public float scrollSensitivity { get; set; }
Property Value
Type Description
float
| Edit this page View Source

selectionAnchorPosition

Declaration
public int selectionAnchorPosition { get; set; }
Property Value
Type Description
int
| Edit this page View Source

selectionColor

Declaration
public Color selectionColor { get; set; }
Property Value
Type Description
Color
| Edit this page View Source

selectionFocusPosition

Declaration
public int selectionFocusPosition { get; set; }
Property Value
Type Description
int
| Edit this page View Source

selectionStringAnchorPosition

Declaration
public int selectionStringAnchorPosition { get; set; }
Property Value
Type Description
int
| Edit this page View Source

selectionStringFocusPosition

Declaration
public int selectionStringFocusPosition { get; set; }
Property Value
Type Description
int
| Edit this page View Source

shouldHideMobileInput

Declaration
public bool shouldHideMobileInput { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

stringPosition

Declaration
public int stringPosition { get; set; }
Property Value
Type Description
int
| Edit this page View Source

stringPositionInternal

Declaration
protected int stringPositionInternal { get; set; }
Property Value
Type Description
int
| Edit this page View Source

stringSelectPositionInternal

Declaration
protected int stringSelectPositionInternal { get; set; }
Property Value
Type Description
int
| Edit this page View Source

text

Declaration
public string text { get; set; }
Property Value
Type Description
string
| Edit this page View Source

textComponent

Declaration
public TMP_Text textComponent { get; set; }
Property Value
Type Description
TMP_Text
| Edit this page View Source

textViewport

Declaration
public RectTransform textViewport { get; set; }
Property Value
Type Description
RectTransform
| Edit this page View Source

verticalScrollbar

Declaration
public Scrollbar verticalScrollbar { get; set; }
Property Value
Type Description
Scrollbar
| Edit this page View Source

wasCanceled

Declaration
public bool wasCanceled { get; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

ActivateInputField()

Declaration
public void ActivateInputField()
| Edit this page View Source

Append(char)

Declaration
protected virtual void Append(char input)
Parameters
Type Name Description
char input
| Edit this page View Source

Append(string)

Declaration
protected virtual void Append(string input)
Parameters
Type Name Description
string input
| Edit this page View Source

ClampCaretPos(ref int)

Declaration
protected void ClampCaretPos(ref int pos)
Parameters
Type Name Description
int pos
| Edit this page View Source

ClampStringPos(ref int)

Declaration
protected void ClampStringPos(ref int pos)
Parameters
Type Name Description
int pos
| Edit this page View Source

DeactivateInputField()

Declaration
public void DeactivateInputField()
| Edit this page View Source

DoStateTransition(SelectionState, bool)

Declaration
protected override void DoStateTransition(Selectable.SelectionState state, bool instant)
Parameters
Type Name Description
Selectable.SelectionState state
bool instant
Overrides
Selectable.DoStateTransition(Selectable.SelectionState, bool)
| Edit this page View Source

ForceLabelUpdate()

Declaration
public void ForceLabelUpdate()
| Edit this page View Source

GraphicUpdateComplete()

Declaration
public virtual void GraphicUpdateComplete()
| Edit this page View Source

KeyPressed(Event)

Declaration
protected TMP_InputField.EditState KeyPressed(Event evt)
Parameters
Type Name Description
Event evt
Returns
Type Description
TMP_InputField.EditState
| Edit this page View Source

LateUpdate()

Declaration
protected virtual void LateUpdate()
| Edit this page View Source

LayoutComplete()

Declaration
public virtual void LayoutComplete()
| Edit this page View Source

MoveTextEnd(bool)

Declaration
public void MoveTextEnd(bool shift)
Parameters
Type Name Description
bool shift
| Edit this page View Source

MoveTextStart(bool)

Declaration
public void MoveTextStart(bool shift)
Parameters
Type Name Description
bool shift
| Edit this page View Source

MoveToEndOfLine(bool, bool)

Declaration
public void MoveToEndOfLine(bool shift, bool ctrl)
Parameters
Type Name Description
bool shift
bool ctrl
| Edit this page View Source

MoveToStartOfLine(bool, bool)

Declaration
public void MoveToStartOfLine(bool shift, bool ctrl)
Parameters
Type Name Description
bool shift
bool ctrl
| Edit this page View Source

OnBeginDrag(PointerEventData)

Declaration
public virtual void OnBeginDrag(PointerEventData eventData)
Parameters
Type Name Description
PointerEventData eventData
| Edit this page View Source

OnControlClick()

Declaration
public void OnControlClick()
| Edit this page View Source

OnDeselect(BaseEventData)

Declaration
public override void OnDeselect(BaseEventData eventData)
Parameters
Type Name Description
BaseEventData eventData
Overrides
UnityEngine.UI.Selectable.OnDeselect(UnityEngine.EventSystems.BaseEventData)
| Edit this page View Source

OnDisable()

Declaration
protected override void OnDisable()
Overrides
UnityEngine.UI.Selectable.OnDisable()
| Edit this page View Source

OnDrag(PointerEventData)

Declaration
public virtual void OnDrag(PointerEventData eventData)
Parameters
Type Name Description
PointerEventData eventData
| Edit this page View Source

OnEnable()

Declaration
protected override void OnEnable()
Overrides
UnityEngine.UI.Selectable.OnEnable()
| Edit this page View Source

OnEndDrag(PointerEventData)

Declaration
public virtual void OnEndDrag(PointerEventData eventData)
Parameters
Type Name Description
PointerEventData eventData
| Edit this page View Source

OnFocus()

Declaration
protected void OnFocus()
| Edit this page View Source

OnPointerClick(PointerEventData)

Declaration
public virtual void OnPointerClick(PointerEventData eventData)
Parameters
Type Name Description
PointerEventData eventData
| Edit this page View Source

OnPointerDown(PointerEventData)

Declaration
public override void OnPointerDown(PointerEventData eventData)
Parameters
Type Name Description
PointerEventData eventData
Overrides
UnityEngine.UI.Selectable.OnPointerDown(UnityEngine.EventSystems.PointerEventData)
| Edit this page View Source

OnScroll(PointerEventData)

Declaration
public virtual void OnScroll(PointerEventData eventData)
Parameters
Type Name Description
PointerEventData eventData
| Edit this page View Source

OnSelect(BaseEventData)

Declaration
public override void OnSelect(BaseEventData eventData)
Parameters
Type Name Description
BaseEventData eventData
Overrides
UnityEngine.UI.Selectable.OnSelect(UnityEngine.EventSystems.BaseEventData)
| Edit this page View Source

OnSubmit(BaseEventData)

Declaration
public virtual void OnSubmit(BaseEventData eventData)
Parameters
Type Name Description
BaseEventData eventData
| Edit this page View Source

OnUpdateSelected(BaseEventData)

Declaration
public virtual void OnUpdateSelected(BaseEventData eventData)
Parameters
Type Name Description
BaseEventData eventData
| Edit this page View Source

ProcessEvent(Event)

Declaration
public void ProcessEvent(Event e)
Parameters
Type Name Description
Event e
| Edit this page View Source

Rebuild(CanvasUpdate)

Declaration
public virtual void Rebuild(CanvasUpdate update)
Parameters
Type Name Description
CanvasUpdate update
| Edit this page View Source

SelectAll()

Declaration
protected void SelectAll()
| Edit this page View Source

SendOnEndEdit()

Declaration
protected void SendOnEndEdit()
| Edit this page View Source

SendOnEndTextSelection()

Declaration
protected void SendOnEndTextSelection()
| Edit this page View Source

SendOnFocus()

Declaration
protected void SendOnFocus()
| Edit this page View Source

SendOnFocusLost()

Declaration
protected void SendOnFocusLost()
| Edit this page View Source

SendOnSubmit()

Declaration
protected void SendOnSubmit()
| Edit this page View Source

SendOnTextSelection()

Declaration
protected void SendOnTextSelection()
| Edit this page View Source

SetGlobalFontAsset(TMP_FontAsset)

Declaration
public void SetGlobalFontAsset(TMP_FontAsset fontAsset)
Parameters
Type Name Description
TMP_FontAsset fontAsset
| Edit this page View Source

SetGlobalPointSize(float)

Declaration
public void SetGlobalPointSize(float pointSize)
Parameters
Type Name Description
float pointSize
| Edit this page View Source

UpdateLabel()

Declaration
protected void UpdateLabel()
| Edit this page View Source

Validate(string, int, char)

Declaration
protected char Validate(string text, int pos, char ch)
Parameters
Type Name Description
string text
int pos
char ch
Returns
Type Description
char

Implements

UnityEngine.EventSystems.IMoveHandler
UnityEngine.EventSystems.IPointerDownHandler
UnityEngine.EventSystems.IPointerUpHandler
UnityEngine.EventSystems.IPointerEnterHandler
UnityEngine.EventSystems.IPointerExitHandler
UnityEngine.EventSystems.ISelectHandler
UnityEngine.EventSystems.IDeselectHandler
UnityEngine.EventSystems.IUpdateSelectedHandler
UnityEngine.EventSystems.IBeginDragHandler
UnityEngine.EventSystems.IDragHandler
UnityEngine.EventSystems.IEndDragHandler
UnityEngine.EventSystems.IPointerClickHandler
UnityEngine.EventSystems.ISubmitHandler
UnityEngine.UI.ICanvasElement
UnityEngine.EventSystems.IScrollHandler
UnityEngine.EventSystems.IEventSystemHandler

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
Extensions.GetFirstInteractable(Selectable)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾