Struct AutoCommandTarget
Component that automates command "reading and sending" (for clients) or "writing, using, and broadcasting" (for the server).
When the AutoCommandTarget component is Enabled, the entity is considered as an input source for ICommandData's for the client and all non empty command buffers present on the entity are serialized into the OutgoingCommandDataStreamBuffer, along with the id of the ghost they are sent to.
On the server side, when a command is deserialized from the IncomingCommandDataStreamBuffer, the corresponding entity is looked up, and if the AutoCommandTarget component is enabled, the commands are added to the corresponding input command buffer.
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct AutoCommandTarget : IComponentData, IQueryTypeParameter
Remarks
To use the AutoCommandTarget, the target entity must have a GhostOwner.
Fields
Enabled
Enabled/Disable the current entity from sending and receiving commands. Multiple entities can be enabled at the same time.
Declaration
public bool Enabled
Field Value
Type | Description |
---|---|
bool |