{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Interface ICommandDataSerializer<T> | Netcode for Entities | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ICommandDataSerializer<T>

    Interface that must be implemented to serialize/deserialize ICommandData. Usually commands serialization / deserialization is automatically generated, unless a NetCodeDisableCommandCodeGenAttribute is added to the command struct to opt-in for manual serializaton. If you enable manual serializaton, you must create a public struct that implement the ICommandDataSerializer for your type, as well as the necessary send and received systems in order to have your RPC sent and received.

    Namespace: Unity.NetCode
    Assembly: solution.dll
    Syntax
    public interface ICommandDataSerializer<T> where T : struct, ICommandData
    Type Parameters
    Name Description
    T

    Methods

    Name Description
    Deserialize(ref DataStreamReader, in RpcDeserializerState, ref T)

    Deserialize a single command from the data stream.

    Deserialize(ref DataStreamReader, in RpcDeserializerState, ref T, in T, StreamCompressionModel)

    Deserialize a single command from the data stream using delta compression

    Serialize(ref DataStreamWriter, in RpcSerializerState, in T)

    Serialize the command to the data stream.

    Serialize(ref DataStreamWriter, in RpcSerializerState, in T, in T, StreamCompressionModel)

    Serialize the command to the data stream using delta compression.

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