Struct GhostComponentSerializer.State
This buffer is added to the GhostCollection singleton entity. Stores serialization meta-data for the ghost. Too large to be stored in chunk memory. Values are generated by the Source Generators.
Implements
Inherited Members
Namespace: Unity.NetCode .LowLevel .Unsafe
Assembly: solution.dll
Syntax
[InternalBufferCapacity(0)]
public struct GhostComponentSerializer.State : IBufferElementData
Fields
Name | Description |
---|---|
Change |
The number of bits necessary for the change mask. |
Component |
The size of the component, as reported by the Type |
Component |
The type of component this serializer act on. |
Copy |
Delegate method used to transfer data from the snapshot buffer to the destination component. |
Copy |
Delegate method used to transfer the component data to the snapshot buffer. |
Deserialize | Deserialize the component and buffer data from the received snapshot and store it inside the Snapshot |
Ghost |
The hash of all serializer fields, along with their Ghost |
Post |
Delegate method to use to post-serialize the component when the ghost use pre-serialization optimization. |
Post |
Delegate method to use to post-serialize buffers when the ghost use pre-serialization optimization. |
Predict |
Calculate the prediction delta for components and buffer. Used for delta-compression. |
Prefab |
Store the Prefab |
Restore |
Delegate method used to restore the state of a replicated component from the Ghost |
Send |
Indicates for which type of ghosts the component should be replicated. The mask is set by code-gen base on the
Prefab |
Send |
Store the Owner |
Serialization |
Internal. Indexer into the Serialization |
Serialize | Delegate method used to serialize the component data for the root entity into the outgoing data stream. Work in batch. |
Serialize |
Delegate method used to serialize the buffer content for the whole chunk. Work in batch for the whole chunk. |
Serialize |
Delegate method used to serialize the component data present in the child entity into the outgoing data stream. Work on a single entity at time. |
Serializer |
An unique hash computed by source generator that identify the serializer type. |
Serializes |
True if this component has the Ghost |
Snapshot |
The size of the component inside the snapshot buffer. |
Variant |
An hash identifying the specific variation used for this serializer (see Ghost |
Properties
Name | Description |
---|---|
Has |
Whether SnapshotSize is greater than zero. |