docs.unity3d.com
    Show / Hide Table of Contents

    Struct CommandReceiveSystem<TCommandDataSerializer, TCommandData>.ReceiveJobData

    Helper struct used by code-gen for implementing the Execute method of the the generated receiving job. The ReceiveJobData implement the command deserialization logic, by reading from the data stream the serialized commands and enqueuing them into the taget entity command buffer. As part of the command deserialization, if a CommandDataInterpolationDelay component is present on target entity, it will be updated with the latest reported interpolation delay.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct ReceiveJobData

    Fields

    autoCommandTargetFromEntity

    Accessor for retrieving the optional AutoCommandTarget component.

    Declaration
    [ReadOnly]
    public ComponentLookup<AutoCommandTarget> autoCommandTargetFromEntity
    Field Value
    Type Description
    ComponentLookup<AutoCommandTarget>

    cmdBufferType

    Read-only type handle for reading the data from the IncomingCommandDataStreamBuffer buffer.

    Declaration
    [ReadOnly]
    public BufferTypeHandle<IncomingCommandDataStreamBuffer> cmdBufferType
    Field Value
    Type Description
    BufferTypeHandle<IncomingCommandDataStreamBuffer>

    commandData

    The output command buffer where the deserialized command are added.

    Declaration
    public BufferLookup<TCommandData> commandData
    Field Value
    Type Description
    BufferLookup<TCommandData>

    commmandTargetType

    Read-only type handle to get the CommandTarget for the connection.

    Declaration
    [ReadOnly]
    public ComponentTypeHandle<CommandTarget> commmandTargetType
    Field Value
    Type Description
    ComponentTypeHandle<CommandTarget>

    compressionModel

    The compression model used for decoding the delta compressed commands.

    Declaration
    public StreamCompressionModel compressionModel
    Field Value
    Type Description
    StreamCompressionModel

    delayFromEntity

    Accessor for retrieving the optional CommandDataInterpolationDelay component from the target entity.

    Declaration
    public ComponentLookup<CommandDataInterpolationDelay> delayFromEntity
    Field Value
    Type Description
    ComponentLookup<CommandDataInterpolationDelay>

    ghostMap

    A readonly mapping to retrieve a ghost entity instance from a SpawnedGhost identity. See SpawnedGhostEntityMap for more information.

    Declaration
    [ReadOnly]
    public NativeParallelHashMap<SpawnedGhost, Entity>.ReadOnly ghostMap
    Field Value
    Type Description
    NativeParallelHashMap.ReadOnly<>

    ghostOwnerFromEntity

    Accessor for retrieving the optional GhostOwner component, and used for lookup the entity target when using AutoCommandTarget.

    Declaration
    [ReadOnly]
    public ComponentLookup<GhostOwner> ghostOwnerFromEntity
    Field Value
    Type Description
    ComponentLookup<GhostOwner>

    netDebug

    The NetDebug singleton component instance.

    Declaration
    public NetDebug netDebug
    Field Value
    Type Description
    NetDebug

    networkIdType

    Read-only type handle to get the NetworkId for the connection.

    Declaration
    [ReadOnly]
    public ComponentTypeHandle<NetworkId> networkIdType
    Field Value
    Type Description
    ComponentTypeHandle<NetworkId>

    serverTick

    The current server tick

    Declaration
    public NetworkTick serverTick
    Field Value
    Type Description
    NetworkTick

    snapshotAckType

    Read-only type handle to get the NetworkSnapshotAck for the connection.

    Declaration
    [ReadOnly]
    public ComponentTypeHandle<NetworkSnapshotAck> snapshotAckType
    Field Value
    Type Description
    ComponentTypeHandle<NetworkSnapshotAck>

    stableHash

    The stable hash for the ICommandData type. Used to verify the commands are consistent.

    Declaration
    public ulong stableHash
    Field Value
    Type Description
    UInt64

    Methods

    Execute(ArchetypeChunk, Int32)

    Decode the commands present in the IncomingCommandDataStreamBuffer for all the connections present in the chunk and lookup for the target entity where the command should be enqueued by either using the CommandTarget target entity or via AutoCommandTarget if enabled.

    Declaration
    public void Execute(ArchetypeChunk chunk, int orderIndex)
    Parameters
    Type Name Description
    ArchetypeChunk chunk
    Int32 orderIndex

    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • Fields
      • autoCommandTargetFromEntity
      • cmdBufferType
      • commandData
      • commmandTargetType
      • compressionModel
      • delayFromEntity
      • ghostMap
      • ghostOwnerFromEntity
      • netDebug
      • networkIdType
      • serverTick
      • snapshotAckType
      • stableHash
    • Methods
      • Execute(ArchetypeChunk, Int32)
    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