RpcAttribute
Attribute that changes the RPC mode for the annotated method to the given RpcAttribute.Mode, optionally specifying the RpcAttribute.TransferMode and RpcAttribute.TransferChannel (on supported peers). See MultiplayerApi.RpcMode and Multiplay
Attribute that changes the RPC mode for the annotated method to the given RpcAttribute.Mode,
optionally specifying the RpcAttribute.TransferMode and RpcAttribute.TransferChannel (on supported peers).
See MultiplayerApi.RpcMode and MultiplayerPeer.TransferModeEnum.
By default, methods are not exposed to networking (and RPCs).
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
RpcAttributeConstructor
public RpcAttribute(MultiplayerApi.RpcMode mode = MultiplayerApi.RpcMode.Authority);Constructs a RpcAttribute instance.
| Name | Type | Default |
|---|---|---|
mode | MultiplayerApi.RpcMode | MultiplayerApi.RpcMode.Authority |
modeThe RPC mode to use.
Properties4
CallLocalProperty
public bool CallLocal { get; set; }If the method will also be called locally; otherwise, it is only called remotely.
ModeProperty
public MultiplayerApi.RpcMode Mode { get; }RPC mode for the annotated method.
TransferChannelProperty
public int TransferChannel { get; set; }Transfer channel for the annotated mode.
TransferModeProperty
public MultiplayerPeer.TransferModeEnum TransferMode { get; set; }Transfer mode for the annotated method.