Namespace Unity.NetCode.LowLevel.Unsafe
Classes
CustomGhostSerializerHelpers
Contains helper methods to write custom chunk serializers. See GhostPrefabCustomSerializer for more information about what a custom chunk serializer function pointer should be used for.
GhostCustomSerializerExtensions
Extension methods for all unmanaged types implementing the IGhostSerializer interface.
Structs
GhostComponentSerializer
Mostly for internal use. A collection helper functions used by code-gen and some runtime systems. See GhostSendSystem, GhostReceiveSystem, and others. To work with ghost snapshots, see SnapshotData and SnapshotDynamicDataBuffer. It also declares all the ghost component/buffers serializers delegate methods, that are used to register (at runtime) the code-generated serializers (to the GhostComponentSerializer.State collection).
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.
NetDebugPacket
Enums
GhostComponentSerializer.SendMask
A bitflag used to mark to which ghost type a component should be serialized to.
Delegates
GhostComponentSerializer.CopyToFromSnapshotDelegate
Delegate method used to transfer the component data to/from the snapshot buffer.
GhostComponentSerializer.DeserializeDelegate
Deserialize the component and buffer data from the received snapshot and store it inside the SnapshotDataBuffer.
GhostComponentSerializer.PostSerializeBufferDelegate
Delegate method to use to post-serialize buffers when the ghost use pre-serialization optimization.
GhostComponentSerializer.PostSerializeDelegate
Delegate method to use to post-serialize the component when the ghost use pre-serialization optimization.
GhostComponentSerializer.PredictDeltaDelegate
Calculate the prediction delta for components and buffer. Used for delta-compression.
GhostComponentSerializer.ReportPredictionErrorsDelegate
Delegate used by the GhostPredictionDebugSystem, collect and report the prediction error for all the replicated fields.
GhostComponentSerializer.RestoreFromBackupDelegate
Delegate method used to restore the state of a replicated component from the GhostPredictionHistoryState buffer. Because the history buffer perform a memory copy of the whole component data, it is necessary to call this method to ensure only the replicated portion of the component is actually restored.
GhostComponentSerializer.SerializeBufferDelegate
Delegate method used to serialize the buffer content for the whole chunk. Works in batches.
GhostComponentSerializer.SerializeChildDelegate
Delegate method used to serialize the component data present in the child entity into the outgoing data stream. Works on a single entity at time.
GhostComponentSerializer.SerializeDelegate
Delegate method used to serialize the component data for the root entity into the outgoing data stream. Works in batches.