Table of Contents

SendMessage

Methods
public bool SendMessage<TTarget>(string methodName, Entity entityId, MessageTarget target, params object[] args) where TTarget : Component

Sends a client message to the connection whose EntityId matches the entityId.

Parameters
Type Name Description
string methodName
Entity entityId
MessageTarget target
object[] args
Returns
Type Description
bool

false if connection for a given entityId was not found, has no associated CoherenceSync, or if sending has failed.

Type Parameters
Name Description
TTarget

Type of the component that should receive this message.

public bool SendMessage(Type targetType, string methodName, Entity entityId, MessageTarget target, params object[] args)

Sends a client message to the connection whose EntityId matches the entityId.

Parameters
Type Name Description
Type targetType
string methodName
Entity entityId
MessageTarget target
object[] args
Returns
Type Description
bool

false if connection for a given entityId was not found, has no associated CoherenceSync, or if sending has failed.

public bool SendMessage<TTarget>(string methodName, ClientID clientId, MessageTarget target, params object[] args) where TTarget : Component

Sends a client message to the connection whose EntityId matches the entityId.

Parameters
Type Name Description
string methodName
ClientID clientId
MessageTarget target
object[] args
Returns
Type Description
bool

false if connection for a given entityId was not found, has no associated CoherenceSync, or if sending has failed.

Type Parameters
Name Description
TTarget

Type of the component that should receive this message.

public bool SendMessage(Type targetType, string methodName, ClientID clientId, MessageTarget target, params object[] args)

Sends a client message to the connection whose ClientId matches the clientId.

Parameters
Type Name Description
Type targetType
string methodName
ClientID clientId
MessageTarget target
object[] args
Returns
Type Description
bool

false if connection for a given clientId was not found, has no associated CoherenceSync, or if sending has failed.