Struct CommandSendSystem<TCommandDataSerializer, TCommandData>.SendJobData
Helper struct used by code-generated command job to serialize the ICommandData into the OutgoingCommandDataStreamBuffer for the client connection.
Inherited Members
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public struct CommandSendSystem<TCommandDataSerializer, TCommandData>.SendJobData
Fields
Name | Description |
---|---|
autoCommandTargetEntities | The list of all ghost entities with a AutoCommandTarget component. |
autoCommandTargetFromEntity | Readonly accessor to retrieve the AutoCommandTarget from the target ghost entity. |
commmandTargetType | The readonly CommandTarget type handle for accessing the chunk data. |
compressionModel | The compression model used to delta encode the old inputs. The first input (the one for the current tick) is serialized as it is. The older ones, are serialized as delta in respect the first one to reduce the bandwidth. |
ghostFromEntity | Reaonly GhostInstance type handle for accessing the chunk data. |
ghostOwnerFromEntity | Readonly accessor to retrieve the GhostOwner from the target ghost entity. |
inputFromEntity | Accessor for retrieving the input buffer from the target entity. |
inputTargetTick | The server tick the command should be executed on the server. |
networkIdType | The readonly networkIdType type handle for accessing the chunk data. |
outgoingCommandBufferType | OutgoingCommandDataStreamBuffer buffer type handle for accessing the chunk data. This is the output of buffer for the job |
prevInputTargetTick | The last server tick for which we send this command |
stableHash | The stable type hash for the command type. Serialized and used on the server side to match and verify the correctness of the input data sent. |
Methods
Name | Description |
---|---|
Execute(ArchetypeChunk, int) | Lookup all the ghost entities for which commands need to be serialized for the current tick and enqueue them into the OutgoingCommandDataStreamBuffer. Are considered as potential ghost targets: - the entity referenced by the CommandTarget - All ghosts owned by the player (see GhostOwner) that present an enabled AutoCommandTarget components. |