Loaded score is -1
The basic way to load leaderboards data is described here.
After this call you should have 6 variants of scores for each leaderboard:
Time span: GPBoardTimeSpan.ALL_TIME Collection:GPCollectionType.GLOBAL Time span: GPBoardTimeSpan.ALL_TIME Collection:GPCollectionType.FRIENDS Time span: GPBoardTimeSpan.WEEK Collection:0GPCollectionType.GLOBAL Time span: GPBoardTimeSpan.WEEK Collection:GPCollectionType.FRIENDS Time span: GPBoardTimeSpan.DAY Collection:GPCollectionType.GLOBAL Time span: GPBoardTimeSpan.DAY Collection:GPCollectionType.FRIENDS
If after ActionLeaderboardsLoaded action is returned with success flag, you will be able to get score data as showed on the snapshot below:
GPLeaderBoard leaderboard = GooglePlayManager.instance.GetLeaderBoard(LEADERBOARD_ID); long score = leaderboard.GetCurrentPlayerScore(GPBoardTimeSpan.ALL_TIME, GPCollectionType.GLOBAL).score;
If your score data is -1, it can be a number of reasons for this.
1) Something is wrong with the app set up, please check your play service and app signature once again as described in Google Play Getting Started Guide
2) There is no data in the leaderboard
3) You are probably experiencing Google Play bug which is similar to this.
By default plugin will try to load leaderboards data ignoring the local cache:
Games.Leaderboards.loadLeaderboardMetadata(mHelper.getGoogleApiClient(), true).setResultCallback(new LeaderBoardsLoadedListener());
So, as soon as it is fixed on google play side, it will work just fine, but so far you can use a workaround and just request scores you need once again via LoadPlayerCenteredScores method.
GooglePlayManager.instance.LoadPlayerCenteredScores(leaderboardId, GPBoardTimeSpan.WEEK, GPCollectionType.FRIENDS, 1);