Get Players in Room
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. |
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 modified 3yr ago