{!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} Struct RpcCollection | Netcode for Entities | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct RpcCollection

    The RpcCollection is the set of all available RPCs. It is created by the RpcSystem. It is used to register RPCs and to get queues for sending RPCs. In most cases you do not need to use it directly, the generated code will use it to setup the RPC components.

    Implements
    IComponentData
    IQueryTypeParameter
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.NetCode
    Assembly: solution.dll
    Syntax
    public struct RpcCollection : IComponentData, IQueryTypeParameter

    Properties

    Name Description
    DynamicAssemblyList

    Treat the set of assemblies loaded on the client / server as dynamic or different. This is only required if assemblies containing ghost component serializers or RPC serializers are removed when building standalone. This property is read in OnUpdate, so it must be set before then. Defaults to false, which saves 6 bytes per header, and allows RPC version errors to trigger immediately upon connecting to the server (rather than needing to wait for an invalid RPC to be received).

    Methods

    Name Description
    GetRpcQueue<TActionSerializer, TActionRequest>()

    Get an RpcQueue which can be used to send RPCs.

    RegisterRpc(ComponentType, PortableFunctionPointer<ExecuteDelegate>)

    Register a new RPC type which can be sent over the network. This must be called before any connections are established.

    RegisterRpc<TActionSerializer, TActionRequest>()

    Register a new RPC type which can be sent over the network. This must be called before any connections are established.

    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)