Class InputEventTrace | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class InputEventTrace

    The InputEventTrace lets you record input events for later processing.

    Inheritance
    System.Object
    InputEventTrace
    Namespace: UnityEngine.InputSystem.LowLevel
    Syntax
    [Serializable]
    public sealed class InputEventTrace : IDisposable, IEnumerable<InputEventPtr>, IEnumerable
    Remarks

    InputEventTrace lets you record input events into a buffer for either a specific device, or for all events received by the input system. This is useful for testing purposes or for replaying recorded input.

    Constructors

    InputEventTrace(Int32)

    Declaration
    public InputEventTrace(int bufferSize = 1048576)
    Parameters
    Type Name Description
    System.Int32 bufferSize

    Properties

    deviceId

    Declaration
    public int deviceId { get; set; }
    Property Value
    Type Description
    System.Int32

    enabled

    Declaration
    public bool enabled { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Clear()

    Declaration
    public void Clear()

    Disable()

    Declaration
    public void Disable()

    Dispose()

    Declaration
    public void Dispose()

    Enable()

    Declaration
    public void Enable()

    Finalize()

    Declaration
    protected void Finalize()

    GetEnumerator()

    Declaration
    public IEnumerator<InputEventPtr> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<InputEventPtr>

    GetNextEvent(ref InputEventPtr)

    Declaration
    public bool GetNextEvent(ref InputEventPtr current)
    Parameters
    Type Name Description
    InputEventPtr current
    Returns
    Type Description
    System.Boolean

    Events

    onEvent

    Declaration
    public event Action<InputEventPtr> onEvent
    Event Type
    Type Description
    System.Action<InputEventPtr>
    Back to top
    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