google play get score from leaderboard

like the title says… i have looked over pretty much every thread, couldnt get it done.
i tried with the following two calls:

ILeaderboard lb = PlayGamesPlatform.Instance.CreateLeaderboard();
				lb.id = leaderBoard;
				lb.LoadScores(ok =>
				{
					if (ok)
					{
						//LoadUsersAndDisplay(lb);
						score = (int)lb.localUserScore.value;
						Debug.LogFormat("User score in leaderboard: {0}", score);
					}
					else
					{
						Debug.Log("Error retrieving leaderboardi");
					}
				});

and

PlayGamesPlatform.Instance.LoadScores(
						leaderBoard,
						LeaderboardStart.PlayerCentered,
						1,
						LeaderboardCollection.Public,
						LeaderboardTimeSpan.AllTime,
						(data) =>
						{
							if (data.Valid)
							{
								score = (int) data.PlayerScore.value;
								Debug.Log("score from inside leaderboard: " + data.PlayerScore.value);
								Debug.Log("formated score from inside leaderboard: " + data.PlayerScore.formattedValue);
							}
							else
							{
								Debug.Log("data invalid in leaderboard");
							}	
						});
				}

Same problem for me ILeaderboard scoreData = Social.CreateLeaderboard(); scoreData.id= ressourcesGoogle.leaderboard_score_leader_board; scoreData.LoadScores( result => { if(result) messageInfo += "DATA TITLE : " + scoreData.title + "\n SCORES RECEVEID : " + scoreData.scores.Length; else messageInfo+= "Error in get leaderboard }); result is true. scoreData.title return "my leader name" so for this it's okay... But scoreData.scores.length return 0... (I have a leader board with 10 scores registred).

2 Answers

2

@Gammaitoni did you found a solution for this?

unfortunately not
I put the problem aside for the moment…