docs.unity3d.com
    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
    Syntax
    public interface INetworkSerializeByMemcpy
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023