docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface INetworkSerializeByMemcpy

    This interface is a "tag" that can be applied to a struct to mark that struct as being serializable by memcpy. It's up to the developer of the struct to analyze the struct's contents and ensure it is actually serializable by memcpy. This requires all of the members of the struct to be unmanaged Plain-Old-Data values - if your struct contains a pointer (or a type that contains a pointer, like NativeList<T>), it should be serialized via INetworkSerializable or via FastBufferReader/FastBufferWriter extension methods.

    Namespace: Unity.Netcode
    Assembly: Unity.Netcode.Runtime.dll
    Syntax
    public interface INetworkSerializeByMemcpy
    In This Article
    Back to top
    Copyright © 2024 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)