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: Unity.NetCode.dll
Syntax
public struct CommandReceiveSystem<TCommandDataSerializer, TCommandData>.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> |
enablePacketLoggingType
Type handle for EnablePacketLogging, which allows us to dump command info to disk.
Declaration
public ComponentTypeHandle<EnablePacketLogging> enablePacketLoggingType
Field Value
Type | Description |
---|---|
ComponentTypeHandle<EnablePacketLogging> |
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<SpawnedGhost, Entity>.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
Type handle to get the NetworkSnapshotAck for the connection.
Declaration
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 |
---|---|
ulong |
Methods
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.
Declaration
public void Execute(ArchetypeChunk chunk, int orderIndex)
Parameters
Type | Name | Description |
---|---|---|
ArchetypeChunk | chunk | |
int | orderIndex |