GameCenter "Leaderboard not found" in Unity editor

GameCenter seems to be working fine on the mobile device: I see the highscore list, see my score and see a couple of friends’ scores there. But when running the game in Unity editor and trying Social.LoadScores(leaderBoardId, OnScoresLoaded) or Social.ShowLeaderboardUI(), it logs an error

Leaderboard not found
UnityEngine.Social:ReportScore(Int64, String, Action`1)

Is this something that I should just not care about? Shouldn’t the API work based on the current platform? So where exactly is it trying to find the leaderboard from? Isn’t it a relatively common practice to use “Error pause”? So getting an error just because running in editor probably doesn’t make sense? So how do I prevent the error?

bump

Its normal the the native gamecenter for iOS is not available inside the editor.
You can use platform dependent compilation to deal with that:

  #if UNITY_IOS
    //Do native stuff
  #else
  //Do editor workaround
#endif
1 Like

I am getting the same “leaderboard not found” error. I have built my app to my phone, I get the “Welcome back” notification, I can open the leaderboard using a button, but when I play my game and then view the leaderboard, it shows no scores in there despite me implementing the ReportScore() function.

I feel as if this has something to do with the “leaderboard not found” error. Am I wrong?

Farid.

1 Like

Yeah, thanks for the reply. I had thought about adding that. Just wanted to make sure that this wasn’t something be concerned about.