docs.unity3d.com
    Show / Hide Table of Contents

    Struct ApplyCurrentInputBufferElementToInputData<TInputBufferData, TInputComponentData>

    For internal use only, helper struct that should be used to implements systems that copies commands from the ICommandData buffer to the IInputComponentData component present on the entity.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    [BurstCompile]
    public struct ApplyCurrentInputBufferElementToInputData<TInputBufferData, TInputComponentData>
        where TInputBufferData : struct, IInputBufferData where TInputComponentData : struct, IInputComponentData
    Type Parameters
    Name Description
    TInputBufferData
    TInputComponentData

    Methods

    Create(ref SystemState)

    Creates all the internal queries and setup the internal component type handles. Very important, add an implicity constraint for running the parent system only when the client is connected to the server, by requiring at least one connection with a NetworkId components. Should be called inside your the system OnCreate method.

    Declaration
    [BurstCompile]
    public EntityQuery Create(ref SystemState state)
    Parameters
    Type Name Description
    SystemState state
    Returns
    Type Description
    EntityQuery

    InitJobData(ref SystemState)

    Update the component type handles and create a new ApplyCurrentInputBufferElementToInputData<TInputBufferData, TInputComponentData>.ApplyInputDataFromBufferJob that can be passed to your job.

    Declaration
    [BurstCompile]
    public ApplyCurrentInputBufferElementToInputData<TInputBufferData, TInputComponentData>.ApplyInputDataFromBufferJob InitJobData(ref SystemState state)
    Parameters
    Type Name Description
    SystemState state
    Returns
    Type Description
    ApplyCurrentInputBufferElementToInputData.ApplyInputDataFromBufferJob<>

    a new ApplyCurrentInputBufferElementToInputData<TInputBufferData, TInputComponentData>.ApplyInputDataFromBufferJob instance.

    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