Get Players in Room

Overview

Gets the players' information of the local player's current room.

Methods

Called by players to begin an asynchronous operation to get the players information of the local player's current room in the Lobby server.

Class

The response object when the operation finished successfully.

The data model of a player.

The error that occurred when a lobby API operation failed.

Example

NetworkClient.Lobby.GetPlayersInRoom((successful, reply, error) =>{
	if (successful){
		Debug.Log("Got players " + reply);
		foreach(SWPlayer player in reply.players){
			Debug.Log("Player custom data: " + player.GetCustomDataString());
		}
	}
	else{
		Debug.Log("Failed to get players " + error);
	}
});

Last updated