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
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public struct CommandReceiveSystem<TCommandDataSerializer, TCommandData>.ReceiveJobData
Fields
Name | Description |
---|---|
autoCommandTargetFromEntity | Accessor for retrieving the optional AutoCommandTarget component. |
cmdBufferType | Read-only type handle for reading the data from the IncomingCommandDataStreamBuffer buffer. |
commandData | The output command buffer where the deserialized command are added. |
commmandTargetType | Read-only type handle to get the CommandTarget for the connection. |
compressionModel | The compression model used for decoding the delta compressed commands. |
delayFromEntity | Accessor for retrieving the optional CommandDataInterpolationDelay component from the target entity. |
ghostMap | A readonly mapping to retrieve a ghost entity instance from a SpawnedGhost identity. See SpawnedGhostEntityMap for more information. |
ghostOwnerFromEntity | Accessor for retrieving the optional GhostOwner component, and used for lookup the entity target when using AutoCommandTarget. |
netDebug | The NetDebug singleton component instance. |
networkIdType | Read-only type handle to get the NetworkId for the connection. |
serverTick | The current server tick |
snapshotAckType | Read-only type handle to get the NetworkSnapshotAck for the connection. |
stableHash | The stable hash for the ICommandData type. Used to verify the commands are consistent. |
Methods
Name | Description |
---|---|
Execute(ArchetypeChunk, int) | 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. |