Struct CommandSendSystem<TCommandDataSerializer, TCommandData>
Helper struct for implementing systems to send commands. This is generally used by code-gen and should only be used directly in special cases.
Inherited Members
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public struct CommandSendSystem<TCommandDataSerializer, TCommandData> where TCommandDataSerializer : unmanaged, ICommandDataSerializer<TCommandData> where TCommandData : unmanaged, ICommandData
Type Parameters
Name | Description |
---|---|
TCommandDataSerializer | Unmanaged CommandDataSerializer of type ICommandDataSerializer. |
TCommandData | Unmanaged CommandData of type ICommandData. |
Fields
Name | Description |
---|---|
k_Input |
The maximum number of inputs sent in each command packet. Resending the last 3 commands adds some redundancy, minimizing the effect of packet loss (unless that packet loss is sustained). |
k_Max |
The maximum serialized size of an individual Command payload, including command headers,
and including the above k_Input |
Properties
Name | Description |
---|---|
Query | The query to use when scheduling the processing job. |
Methods
Name | Description |
---|---|
Init |
Initialize the internal state of a processing job, should be called from OnUpdate of an ISystem. |
Should |
Utility method to check if the processing job needs to run, used as an early-out in OnUpdate of an ISystem. |