docs.unity.cn
    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
    Syntax
    public interface IInputEventHelper<T>
        where T : struct, IInputComponentData
    Type Parameters
    Name Description
    T

    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

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, September 20, 2023