{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class TMP_InputField | TextMeshPro | 3.0.1
docs.unity3d.com
"{0}" の検索結果

    目次を表示する/隠す

    Class TMP_InputField

    Editable text input field.

    Inheritance
    object
    UIBehaviour
    Selectable
    TMP_InputField
    Implements
    IMoveHandler
    IPointerDownHandler
    IPointerUpHandler
    IPointerEnterHandler
    IPointerExitHandler
    ISelectHandler
    IDeselectHandler
    IUpdateSelectedHandler
    IBeginDragHandler
    IDragHandler
    IEndDragHandler
    IPointerClickHandler
    ISubmitHandler
    ICanvasElement
    ILayoutElement
    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: solution.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, ILayoutElement, IScrollHandler, IEventSystemHandler

    Constructors

    Name Description
    TMP_InputField()

    Fields

    Name Description
    m_CaretPosition
    m_CaretSelectPosition
    m_CaretVisible
    m_CursorVerts
    m_GlobalFontAsset
    m_InputValidator
    m_LineLimit
    m_Mesh
    m_OnFocusSelectAll
    m_Placeholder
    m_RectTransform

    Text Text used to display the input's value.

    m_ResetOnDeActivation
    m_ScrollSensitivity
    m_SoftKeyboard
    m_StringPosition
    m_StringSelectPosition
    m_Text

    Input field's value.

    m_TextComponent
    m_TextComponentRectMask
    m_TextComponentRectTransform
    m_TextViewport
    m_TextViewportRectMask
    m_VerticalScrollbar
    m_VerticalScrollbarEventHandler
    m_isRichTextEditingAllowed
    m_isSelectAll

    Properties

    Name Description
    asteriskChar
    caretBlinkRate
    caretColor
    caretPosition

    Get: Returns the focus position as thats the position that moves around even during selection. Set: Set both the anchor and focus position such that a selection doesn't happen

    caretPositionInternal

    Current position of the cursor. Getters are public Setters are protected

    caretSelectPositionInternal
    caretWidth
    characterLimit
    characterValidation
    contentType
    customCaretColor
    flexibleHeight

    See ILayoutElement.flexibleHeight.

    flexibleWidth

    See ILayoutElement.flexibleWidth.

    fontAsset

    Sets the Font Asset on both Placeholder and Input child objects.

    inputType
    inputValidator

    Sets the Input Validation to use a Custom Input Validation script.

    isFocused
    isRichTextEditingAllowed

    Is Rich Text editing allowed?

    keyboardType
    layoutPriority

    See ILayoutElement.layoutPriority.

    lineLimit

    Limits the number of lines of text in the Input Field.

    lineType
    mesh
    minHeight

    See ILayoutElement.minHeight.

    minWidth

    See ILayoutElement.minWidth.

    multiLine
    onDeselect
    onEndEdit
    onEndTextSelection
    onFocusSelectAll

    Determines if the whole text will be selected when focused.

    onSelect
    onSubmit
    onTextSelection
    onTouchScreenKeyboardStatusChanged
    onValidateInput
    onValueChanged
    placeholder
    pointSize

    Set the point size on both Placeholder and Input text object.

    preferredHeight

    Get the height of all the text if constrained to the height of the RectTransform.

    preferredWidth

    Get the displayed with of all input characters.

    readOnly
    resetOnDeActivation

    Determines if the text and caret position as well as selection will be reset when the input field is deactivated.

    restoreOriginalTextOnEscape

    Controls whether the original text is restored when pressing "ESC".

    richText
    scrollSensitivity
    selectionAnchorPosition

    Get: Returns the fixed position of selection Set: If compositionString is 0 set the fixed position

    selectionColor
    selectionFocusPosition

    Get: Returns the variable position of selection Set: If compositionString is 0 set the variable position

    selectionStringAnchorPosition

    The fixed position of the selection in the raw string which may contains rich text.

    selectionStringFocusPosition

    The variable position of the selection in the raw string which may contains rich text.

    shouldHideMobileInput

    Should the mobile keyboard input be hidden.

    shouldHideSoftKeyboard
    stringPosition
    stringPositionInternal
    stringSelectPositionInternal
    text

    Input field's current text value. This is not necessarily the same as what is visible on screen.

    textComponent
    textViewport
    verticalScrollbar
    wasCanceled

    Methods

    Name Description
    ActivateInputField()
    Append(char)
    Append(string)

    Append the specified text to the end of the current.

    CalculateLayoutInputHorizontal()

    See ILayoutElement.CalculateLayoutInputHorizontal.

    CalculateLayoutInputVertical()

    See ILayoutElement.CalculateLayoutInputVertical.

    ClampCaretPos(ref int)
    ClampStringPos(ref int)
    DeactivateInputField(bool)
    DoStateTransition(SelectionState, bool)
    ForceLabelUpdate()
    GraphicUpdateComplete()
    IsValidChar(char)
    KeyPressed(Event)
    LateUpdate()

    Update the text based on input.

    LayoutComplete()
    MoveTextEnd(bool)

    Move to the end of the text.

    MoveTextStart(bool)

    Move to the start of the text.

    MoveToEndOfLine(bool, bool)

    Move to the end of the current line of text.

    MoveToStartOfLine(bool, bool)

    Move to the start of the current line of text.

    OnBeginDrag(PointerEventData)
    OnControlClick()
    OnDeselect(BaseEventData)
    OnDisable()
    OnDrag(PointerEventData)
    OnEnable()
    OnEndDrag(PointerEventData)
    OnFocus()
    OnPointerClick(PointerEventData)
    OnPointerDown(PointerEventData)
    OnScroll(PointerEventData)
    OnSelect(BaseEventData)
    OnSubmit(BaseEventData)
    OnUpdateSelected(BaseEventData)
    ProcessEvent(Event)
    Rebuild(CanvasUpdate)
    ReleaseSelection()
    SelectAll()
    SendOnEndEdit()

    Submit the input field's text.

    SendOnEndTextSelection()
    SendOnFocus()
    SendOnFocusLost()
    SendOnSubmit()
    SendOnTextSelection()
    SendTouchScreenKeyboardStatusChanged()
    SetGlobalFontAsset(TMP_FontAsset)

    Function to conveniently set the Font Asset of both Placeholder and Input Field text object.

    SetGlobalPointSize(float)

    Function to conveniently set the point size of both Placeholder and Input Field text object.

    SetTextWithoutNotify(string)

    Set Input field's current text value without invoke onValueChanged. This is not necessarily the same as what is visible on screen.

    UpdateLabel()

    Update the visual text Text.

    Validate(string, int, char)

    Validate the specified input.

    概要
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)