I am storing playerscore, distance traveled, spriteindex, player name data using update PlayFabClientAPI.UpdatePlayerStatistics
public void SetStats() { PlayFabClientAPI.UpdatePlayerStatistics(new UpdatePlayerStatisticsRequest { // request.Statistics is a list, so multiple StatisticUpdate objects can be defined if required. Statistics = new List<StatisticUpdate> { new StatisticUpdate {StatisticName = "PlayerLongestDistance", Value = playerLongestDistance}, new StatisticUpdate {StatisticName = "KairiIndex", Value = _kairiIndex}, new StatisticUpdate {StatisticName = "RaikiIndex", Value = _raikiIndex}, new StatisticUpdate {StatisticName = "RavenIndex", Value = _ravenIndex}, } }, result => { Debug.Log("User statistics updated"); }, error => { Debug.LogError(error.GenerateErrorReport()); }); }
I want to load all the data that is saved, I am using this function to get the leaderboard it is returning a single stat. How can i get all the stats stats that i have saved.
public void GetLeaderBoard() { var requestLeaderBoard = new GetLeaderboardRequest { StartPosition = 0, StatisticName = "PlayerLongestDistance", MaxResultsCount = 20 }; PlayFabClientAPI.GetLeaderboard(requestLeaderBoard, OnGetLeaderBoard, OnErrorLeaderboard); }