Hi all,
I've got the following script (section specific) to display a players name, rank and score throughout numerous, separate, leaderboards
void OnGetLeaderboard(GetLeaderboardResult result)
{
leaderboardMasterPanel.SetActive(true);
// Debug.Log(result.Leaderboard[0].StatValue);
foreach(PlayerLeaderboardEntry player in result.Leaderboard)
{
GameObject tempListing = Instantiate(listingPrefab, listingContainer);
LeaderboardListing LL = tempListing.GetComponent<LeaderboardListing>();
LL.playerRank.text = player.Position.ToString();
LL.playerNameText.text = player.DisplayName;
LL.playerScoreText.text = player.StatValue.ToString();
Debug.Log(player.DisplayName + ": " + player.StatValue);
}
}
This works perfectly, however Playfab standard starts the leaderboard player position(Rank) count from 0. Is there a simple way to have this start from 1?
Thanks!