docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IInputEventHelper<T>

    Internal use only, interface implemented by code-generated helpers to increment and decrement IInputComponentData events when copy to/from the underlying InputBufferData<T>

    Namespace: Unity.NetCode
    Assembly: Unity.NetCode.dll
    Syntax
    public interface IInputEventHelper<T> where T : unmanaged, IInputComponentData
    Type Parameters
    Name Description
    T

    Input component type

    Methods

    DecrementEvents(ref T, in T)

    Take the stored input data we have and copy to the given input data pointed to. Decrement any event counters by the counter value in the previous command buffer data element.

    Declaration
    void DecrementEvents(ref T inputData, in T prevInputData)
    Parameters
    Type Name Description
    T inputData

    Our stored input data will be copied over to this location

    T prevInputData

    Command data from the previous tick

    IncrementEvents(ref T, in T)

    Save the input data with any event counters incremented by the counter from the last stored input in the command buffer for the current tick. See InputEvent.

    Declaration
    void IncrementEvents(ref T inputData, in T lastInputData)
    Parameters
    Type Name Description
    T inputData

    Pointer to input data to be saved in this command data

    T lastInputData

    Pointer to the last command data in the buffer

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)