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

    Class InputActionTrace

    Records the triggering of actions into a sequence of events that can be replayed at will.

    Inheritance
    System.Object
    InputActionTrace
    Namespace: UnityEngine.Experimental.Input
    Syntax
    public class InputActionTrace : IEnumerable<InputActionTrace.ActionEventPtr>, IDisposable
    Remarks

    This is an alternate way to the callback-based responses (such as performed) of InputAction. Instead of executing response code right away whenever an action triggers, an RecordAction(InputAction.CallbackContext) which can then be queried on demand.

    Properties

    buffer

    Directly access the underlying raw memory queue.

    Declaration
    public InputEventBuffer buffer { get; }
    Property Value
    Type Description
    InputEventBuffer

    count

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

    Methods

    Clear()

    Declaration
    public void Clear()

    Dispose()

    Declaration
    public void Dispose()

    GetEnumerator()

    Declaration
    public IEnumerator<InputActionTrace.ActionEventPtr> GetEnumerator()
    Returns
    Type Description
    IEnumerator<InputActionTrace.ActionEventPtr>

    RecordAction(InputAction.CallbackContext)

    Record the triggering of an action as an InputActionTrace.ActionEventPtr.

    Declaration
    public void RecordAction(InputAction.CallbackContext context)
    Parameters
    Type Name Description
    InputAction.CallbackContext context
    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