편집

다음을 통해 공유


TMP_KeyboardInputField Class

Definition

A component that can be added to InputField to make it work with Windows Mixed Reality's system keyboard. Only used in Unity 2018.4. No longer used in Unity 2019.3 and later versions (becomes an empty MonoBehaviour and is only around for compatibility) and you can safely remove it if you wish

public ref class TMP_KeyboardInputField : Microsoft::MixedReality::Toolkit::Experimental::UI::KeyboardInputFieldBase<TMPro::TMP_InputField ^>
public ref class TMP_KeyboardInputField : Microsoft::MixedReality::Toolkit::Experimental::UI::KeyboardInputFieldBase<Microsoft::MixedReality::Toolkit::Experimental::UI::MRTKTMPInputField ^>
public ref class TMP_KeyboardInputField : UnityEngine::MonoBehaviour
[UnityEngine.AddComponentMenu("Scripts/MRTK/Experimental/Keyboard/TMP_KeyboardInputField")]
[UnityEngine.RequireComponent(typeof(TMPro.TMP_InputField))]
public class TMP_KeyboardInputField : Microsoft.MixedReality.Toolkit.Experimental.UI.KeyboardInputFieldBase<TMPro.TMP_InputField>
[UnityEngine.AddComponentMenu("Scripts/MRTK/Experimental/Keyboard/TMP_KeyboardInputField")]
[UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.Experimental.UI.MRTKTMPInputField))]
public class TMP_KeyboardInputField : Microsoft.MixedReality.Toolkit.Experimental.UI.KeyboardInputFieldBase<Microsoft.MixedReality.Toolkit.Experimental.UI.MRTKTMPInputField>
public class TMP_KeyboardInputField : UnityEngine.MonoBehaviour
[<UnityEngine.AddComponentMenu("Scripts/MRTK/Experimental/Keyboard/TMP_KeyboardInputField")>]
[<UnityEngine.RequireComponent(typeof(TMPro.TMP_InputField))>]
type TMP_KeyboardInputField = class
    inherit KeyboardInputFieldBase<TMP_InputField>
[<UnityEngine.AddComponentMenu("Scripts/MRTK/Experimental/Keyboard/TMP_KeyboardInputField")>]
[<UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.Experimental.UI.MRTKTMPInputField))>]
type TMP_KeyboardInputField = class
    inherit KeyboardInputFieldBase<MRTKTMPInputField>
type TMP_KeyboardInputField = class
    inherit MonoBehaviour
Public Class TMP_KeyboardInputField
Inherits KeyboardInputFieldBase(Of TMP_InputField)
Public Class TMP_KeyboardInputField
Inherits KeyboardInputFieldBase(Of MRTKTMPInputField)
Public Class TMP_KeyboardInputField
Inherits MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
KeyboardInputFieldBase<TMPro.TMP_InputField>
TMP_KeyboardInputField
Inheritance
TMP_KeyboardInputField
Inheritance
UnityEngine.MonoBehaviour
TMP_KeyboardInputField
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.RequireComponentAttribute

Remarks

If using Unity 2019 or 2020, make sure the version >= 2019.4.25 or 2020.3.2 to ensure the latest fixes for Unity keyboard bugs are present.

There is a known Unity/TMP issue preventing the caret from showing up. Please see https://github.com/microsoft/MixedRealityToolkit-Unity/issues/9056 for updates.

Constructors

TMP_KeyboardInputField()

Fields

inputField (Inherited from KeyboardInputFieldBase<T>)

Properties

CaretIndex

Returns the index of the caret within the text.

(Inherited from MixedRealityKeyboardBase)
DisableUIInteractionWhenTyping

Whether disable user's interaction with other UI elements while typing. Use this option to decrease the chance of keyboard getting accidentally closed.

(Inherited from MixedRealityKeyboardBase)
OnCommitText

Event which triggers when commit action is invoked on the keyboard. (Usually the return key.)

(Inherited from MixedRealityKeyboardBase)
OnHideKeyboard

Event which triggers when the keyboard is hidden.

(Inherited from MixedRealityKeyboardBase)
OnShowKeyboard

Event which triggers when the keyboard is shown.

(Inherited from MixedRealityKeyboardBase)
Text
Visible

Returns true if the keyboard is currently open.

(Inherited from MixedRealityKeyboardBase)

Methods

ClearKeyboardText()

Removes the current text from the keyboard.

(Inherited from MixedRealityKeyboardBase)
HideKeyboard()

Closes the keyboard for user interaction.

(Inherited from MixedRealityKeyboardBase)
PlaceHolderGraphic(MRTKTMPInputField)
PlaceHolderGraphic(T) (Inherited from KeyboardInputFieldBase<T>)
PlaceHolderGraphic(TMP_InputField)
ShowKeyboard(String, Boolean)

Opens the keyboard for user interaction.

(Inherited from MixedRealityKeyboardBase)
SyncCaret()
SyncCaret() (Inherited from MixedRealityKeyboardBase)
TextGraphic(MRTKTMPInputField)
TextGraphic(T) (Inherited from KeyboardInputFieldBase<T>)
TextGraphic(TMP_InputField)

Applies to