docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    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>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)