MessagePlayer(string, string, Action<bool, SWLobbyError>) Method
Namespace: SWNetwork.Lobby
Called by players to begin an asynchronous operation to send message to another player using the specified targetPlayerId and string messageData.

Declaration

public void MessagePlayer(string targetPlayerId, string messageData, Action<bool, SWLobbyError> callback)
Parameters
Type
Description
targetPlayerId
string
ID of the player to receive the message.
messageData
string
String message data.
callback
Action<bool, SWLobbyError>
The method to invoke when the message player operation is complete.

Overloads

MessagePlayer(string, object, Action) Method

Called by players to begin an asynchronous operation to send message to another player using the specified targetPlayerId and serializable object messageData.

Declaration

public void MessagePlayer(string targetPlayerId, object messageData, Action<bool, SWLobbyError> callback)
Parameters
Type
Description
targetPlayerId
string
ID of the player to receive the message.
messageData
object
Serializable object message data.
callback
Action<bool, SWLobbyError>
The method to invoke when the message player operation is complete.