Cheers guys and happy new year ![:) :)]()
What's the recommended way to get a player custom property and print every player ranked using photon networks player list?
I'd try something like this but I cannot figure out how to code that the score get's ranked and displayed in the correct order? :
Greets

What's the recommended way to get a player custom property and print every player ranked using photon networks player list?
I'd try something like this but I cannot figure out how to code that the score get's ranked and displayed in the correct order? :
void DisplayRanking()
{
foreach (PhotonPlayer player in PhotonNetwork.playerList)
{
int score = (int)player.CustomProperties["score"];
// but how to code that the score now get's ranked and displayed in the correct order?
display.text += (player.NickName + " Score: " + player.CustomProperties["score"] + " \n");
}
}
Greets