- Home /
Question by
Bongmo · Jul 17, 2016 at 05:37 PM ·
iosleaderboardsocialgame centerloadscores
ILeaderboard on iOS is not working?
The bottom code is only working, when I comment the SetUserFilter() line. Like this:
// m_Leaderboard.SetUserFilter(userIds);
But why? I want the actual score from the local user. How can I do this?
ILeaderboard m_Leaderboard;
...
string[] userIds = new string[] { Social.localUser.id };
m_Leaderboard = Social.CreateLeaderboard();
m_Leaderboard.id = "1";
m_Leaderboard.SetUserFilter(userIds);
m_Leaderboard.LoadScores ( result => {
Debug.Log("Received " + m_Leaderboard.scores.Length + " scores");
foreach (IScore score in m_Leaderboard.scores) {
Debug.Log("Score: "+score);
}
});
What I'm doing wrong?
I've created a leaderboard on the Game Center.
Comment