docs.unity3d.com
    Show / Hide Table of Contents

    Struct TextEvent

    A single character text input event.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Namespace: UnityEngine.InputSystem.LowLevel
    Syntax
    public struct TextEvent : IInputEventTypeInfo
    Remarks

    Text input does not fit the control-based input model well and thus is represented as its own form of input. A device that is capable of receiving text input (such as Keyboard) receives text input events and should implement ITextInputReceiver in order for the input system to be able to relay these events to the device.

    Fields

    baseEvent

    Declaration
    public InputEvent baseEvent
    Field Value
    Type Description
    InputEvent

    character

    Character in UTF-32 encoding.

    Declaration
    public int character
    Field Value
    Type Description
    Int32

    Type

    Declaration
    public const int Type = 1413830740
    Field Value
    Type Description
    Int32

    Properties

    typeStatic

    Declaration
    public readonly FourCC typeStatic { get; }
    Property Value
    Type Description
    FourCC
    Implements
    IInputEventTypeInfo.typeStatic

    Methods

    Create(Int32, Char, Double)

    Declaration
    public static TextEvent Create(int deviceId, char character, double time = -1)
    Parameters
    Type Name Description
    Int32 deviceId
    Char character
    Double time
    Returns
    Type Description
    TextEvent

    Create(Int32, Int32, Double)

    Declaration
    public static TextEvent Create(int deviceId, int character, double time = -1)
    Parameters
    Type Name Description
    Int32 deviceId
    Int32 character
    Double time
    Returns
    Type Description
    TextEvent

    From(InputEventPtr)

    Declaration
    public static TextEvent*From(InputEventPtr eventPtr)
    Parameters
    Type Name Description
    InputEventPtr eventPtr
    Returns
    Type Description
    TextEvent*
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023