docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BufferSerializerExtensions

    Tells the BufferSerializer<TReaderWriter> how to serialize and deserialize our custom type.

    Inheritance
    object
    BufferSerializerExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DocumentationCodeSamples
    Assembly: Unity.Netcode.Editor.Tests.dll
    Syntax
    public static class BufferSerializerExtensions

    Methods

    SerializeValue<TReaderWriter>(BufferSerializer<TReaderWriter>, ref Health)

    Extension method to override bi-directional serialization for a custom type.

    Declaration
    public static void SerializeValue<TReaderWriter>(this BufferSerializer<TReaderWriter> serializer, ref Health health) where TReaderWriter : IReaderWriter
    Parameters
    Type Name Description
    BufferSerializer<TReaderWriter> serializer

    Bi-directional serial

    Health health

    The type to customize or override.

    Type Parameters
    Name Description
    TReaderWriter

    Boilerplate syntax to enable the bi-directional serialization.

    In This Article
    Back to top
    Copyright © 2026 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)