Photon Fusion 2.1.1

RpcInfo Struct Reference

RpcInfo is a struct that contains information about the RPC message. More...

Public Member Functions

void Cancel ()
 Only valid when IsValidating. Marks RPC as handled and will not forward it to any client.
override string ToString ()
 Returns a string that represents the current RpcInfo.

Static Public Member Functions

static RpcInfo FromLocal (NetworkRunner runner, RpcChannel channel, RpcHostMode hostMode)
 Creates a new RpcInfo instance for a local RPC message.
static RpcInfo FromRemote (in RpcInvokeContext context, RpcHostMode hostMode, RpcChannel channel)
 Creates a new RpcInfo instance from a RpcInvokeContext.

Public Attributes

readonly RpcChannel Channel
 Represents the channel through which the RPC message was sent.
readonly bool IsInvokeLocal
 Indicates whether the RPC message is invoked locally.
readonly PlayerRef Source
 Represents the player who sent the RPC message.
readonly Tick Tick
 Represents the tick at which the RPC message was sent.

Properties

bool IsValidating [get]
 Indicates whether this invocation is used for validation.

Detailed Description

RpcInfo is a struct that contains information about the RPC message.

Member Function Documentation

◆ FromLocal()

RpcInfo FromLocal ( NetworkRunner runner,
RpcChannel channel,
RpcHostMode hostMode )
static

Creates a new RpcInfo instance for a local RPC message.

Parameters
runnerThe NetworkRunner associated with the RPC message.
channelThe RpcChannel through which the RPC message was sent.
hostModeThe RpcHostMode of the RPC message.
Returns
Returns a new RpcInfo instance with the provided parameters.

◆ FromRemote()

RpcInfo FromRemote ( in RpcInvokeContext context,
RpcHostMode hostMode,
RpcChannel channel )
static

Creates a new RpcInfo instance from a RpcInvokeContext.

Parameters
contextThe RPC invoke context
hostModeThe RpcHostMode of the RPC message.
channelThe channel RPC has been sent with.
Returns
Returns a new RpcInfo instance with the provided parameters.

◆ ToString()

override string ToString ( )

Returns a string that represents the current RpcInfo.

Returns
Returns a string that represents the current RpcInfo.