Skip to main content

Class ClientRpcSender

Inheritance
System.Object
Inherited Members
Show
Syntax
public static class ClientRpcSender

Methods

Send(NetworkBehaviour, Int32, NetworkWriter, Channel, Boolean)

Declaration
public static void Send(NetworkBehaviour behaviour, int relativeIndex, NetworkWriter writer, Channel channelId, bool excludeOwner)
Parameters
TypeNameDescription
Mirage.NetworkBehaviourbehaviour
System.Int32relativeIndex
Mirage.Serialization.NetworkWriterwriter
Mirage.ChannelchannelId
System.BooleanexcludeOwner

SendTarget(NetworkBehaviour, Int32, NetworkWriter, Channel, INetworkPlayer)

Declaration
public static void SendTarget(NetworkBehaviour behaviour, int relativeIndex, NetworkWriter writer, Channel channelId, INetworkPlayer player)
Parameters
TypeNameDescription
Mirage.NetworkBehaviourbehaviour
System.Int32relativeIndex
Mirage.Serialization.NetworkWriterwriter
Mirage.ChannelchannelId
Mirage.INetworkPlayerplayer

SendTargetWithReturn<T>(NetworkBehaviour, Int32, NetworkWriter, INetworkPlayer)

Declaration
public static UniTask<T> SendTargetWithReturn<T>(NetworkBehaviour behaviour, int relativeIndex, NetworkWriter writer, INetworkPlayer player)
Parameters
TypeNameDescription
Mirage.NetworkBehaviourbehaviour
System.Int32relativeIndex
Mirage.Serialization.NetworkWriterwriter
Mirage.INetworkPlayerplayer
Returns
TypeDescription
Cysharp.Threading.Tasks.UniTask<T>

ShouldInvokeLocally(NetworkBehaviour, RpcTarget, INetworkPlayer, Boolean)

Used by weaver to check if ClientRPC should be invoked locally in host mode

Declaration
public static bool ShouldInvokeLocally(NetworkBehaviour behaviour, RpcTarget target, INetworkPlayer player, bool excludeOwner)
Parameters
TypeNameDescription
Mirage.NetworkBehaviourbehaviour
Mirage.RpcTargettarget
Mirage.INetworkPlayerplayerplayer used for RpcTarget.Player
System.BooleanexcludeOwner
Returns
TypeDescription
System.Boolean

IsLocalPlayerObserver(NetworkBehaviour, Boolean)

Checks if host player can see the object Weaver uses this to check if RPC should be invoked locally

Declaration
public static bool IsLocalPlayerObserver(NetworkBehaviour behaviour, bool excludeOwner)
Parameters
TypeNameDescription
Mirage.NetworkBehaviourbehaviour
System.BooleanexcludeOwner
Returns
TypeDescription
System.Boolean

IsLocalPlayerTarget(NetworkBehaviour, INetworkPlayer)

Checks if host player is the target player Weaver uses this to check if RPC should be invoked locally

Declaration
public static bool IsLocalPlayerTarget(NetworkBehaviour behaviour, INetworkPlayer target)
Parameters
TypeNameDescription
Mirage.NetworkBehaviourbehaviour
Mirage.INetworkPlayertarget
Returns
TypeDescription
System.Boolean