Struct GhostPrefabCustomSerializer
Allow to associate for a given ghost prefab a custom made (hand written) serialization function. The method allow to serialize on per "archetype", allowing for better vectorization and optimisation in general. However, writing the serialization code is not trivial and require deep knowledge of the underlying GhostChunkSerializer implementation, data and wire format.
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct GhostPrefabCustomSerializer
Fields
PreSerializeChunk
A custom serializer function to serializer the chunk (only for server)
Declaration
public PortableFunctionPointer<GhostPrefabCustomSerializer.ChunkPreserializeDelegate> PreSerializeChunk
Field Value
Type | Description |
---|---|
PortableFunctionPointer<GhostPrefabCustomSerializer.ChunkPreserializeDelegate> |
SerializeChunk
The function pointer to invoke for serializing the chunk.
Declaration
public PortableFunctionPointer<GhostPrefabCustomSerializer.ChunkSerializerDelegate> SerializeChunk
Field Value
Type | Description |
---|---|
PortableFunctionPointer<GhostPrefabCustomSerializer.ChunkSerializerDelegate> |