Method RegisterRpc
RegisterRpc<TActionSerializer, TActionRequest>()
Register a new RPC type which can be sent over the network. This must be called before any connections are established.
Declaration
public void RegisterRpc<TActionSerializer, TActionRequest>() where TActionSerializer : struct, IRpcCommandSerializer<TActionRequest> where TActionRequest : struct, IComponentData
Type Parameters
| Name | Description |
|---|---|
| TActionSerializer | A struct of type IRpcCommandSerializer. |
| TActionRequest | A struct of type IComponent. |
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.
Declaration
public void RegisterRpc(ComponentType type, PortableFunctionPointer<RpcExecutor.ExecuteDelegate> exec)
Parameters
| Type | Name | Description |
|---|---|---|
| ComponentType | type | Type to register. |
| PortableFunctionPointer<RpcExecutor.ExecuteDelegate> | exec | Callback for RPC to execute. |