docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class FastBufferExtensions

    Tells the Netcode how to serialize and deserialize our custom type.

    Inheritance
    object
    FastBufferExtensions
    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 FastBufferExtensions

    Methods

    ReadValueSafe(FastBufferReader, out Health)

    Extension method to override the de-serialization for a custom type.

    Declaration
    public static void ReadValueSafe(this FastBufferReader reader, out Health health)
    Parameters
    Type Name Description
    FastBufferReader reader

    Buffer to read values from.

    Health health

    The type to customize or override.

    WriteValueSafe(FastBufferWriter, in Health)

    Extension method to override the serialization for a custom type.

    Declaration
    public static void WriteValueSafe(this FastBufferWriter writer, in Health health)
    Parameters
    Type Name Description
    FastBufferWriter writer

    Buffer to write values into.

    Health health

    The type to customize or override.

    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)