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.
Inherited Members
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public struct RpcCollection : IComponentData, IQueryTypeParameter
Properties
Name | Description |
---|---|
Dynamic |
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 |
---|---|
Get |
Get an RpcQueue which can be used to send RPCs. |
Register |
Register a new RPC type which can be sent over the network. This must be called before any connections are established. |
Register |
Register a new RPC type which can be sent over the network. This must be called before any connections are established. |