iOS Game Center Integration

Hello,
I am a beginner of developing games with unity.
I met a strange issue and can`t solve it myself.
I am developing a game that includes the game center integration.
I used simple unity codes as shown below.

using UnityEngine.SocialPlatform;
using UnityEngine.SocialPlatform.GameCenter;
private string leaderboardID = “TestVersion”
public void GameCenterButtonPressed(){
Social.localUser.Authenticate (HandleAuthenticated);
}
privatevoidHandleAuthenticated(bool success){
if (success) {
Social.ReportScore(-5, leaderboardID, HandleScoreReported);
}
}

I registered my test app on iTunes and set the leaderboard in Game Center tab.
But nothing happens. I never saw Game Center Login window.
I saw several tutorials for integration Game Center on iOS and followed them, but had no good result.
And I wonder if it can be solved by using this simple codes.
Please help me.

Have you set your device to Developer Mode? That was my issue when I first started to do the Game Center stuff.

You might have better luck asking here: Unity Engine - Unity Discussions

Thank you for your reply.
And how can I set my ipad to Developer Mode?
I registered my pad`s UDID on Apple Developer Console and used it on my provisioning file.
Is this the cause of this issue?
And I tested Game Center as my sandbox test account which is registered on itunes as a sandbox test accounts.
I need your help once again.

Please ask in the correct forum section linked above.

I had an issue with Game Center Leaderboards and this is how I solved it:

Game Center Login was Success!
I noticed that I didnt set Game Center on my device to developer. I set it and login is success. But no socre was reported. I think it is the cause of incorrect setting on itunes or incorrect leaderboard name in my code. ![2053453--133573--ScoreBoard.png|990x796](upload://nUVXezAsqzAxCRyAD5zW6qT7UKs.png) This is my setting on iTunes. And I enabled the Game Center item on my app setting. I cant know why the score is not reported.

using UnityEngine.SocialPlatform;
using UnityEngine.SocialPlatform.GameCenter;

private string leaderboardID = “TestVersion”

public void GameCenterButtonPressed(){
Social.localUser.Authenticate (HandleAuthenticated);
}
privatevoidHandleAuthenticated(bool success){
if (success) {
Social.ReportScore(-5, “footgolfscoreboard”, HandleScoreReported);
}
}
I set code like that but I couldn`t see the posted score on Game Center.
I tested it with my Sandbox test account which was registered.
Please help me who knows this issue.

You are reporting a negative score -5.

What happens if you try a positive number like 5?

I didn`t like that, but I think the result will be same as before.
Because As you can see, I made another scoreboard and posted positive number.
But nothing happened.

I cannot find where you get “Standings” from. I get “Leaderboards”. Is the page translated from another language? See attached.

Another thought, did you try “parscore” as ID?

Ahh… I think you are using Leaderboard Sets which are different than regular Leaderboards.

See this (scroll way down to the bottom):
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/LeaderBoards/LeaderBoards.html

And this:
https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectGameCenter_Guide/Leaderboards/Leaderboards.html#//apple_ref/doc/uid/TP40013726-CH2

I have never used Leaderboard Sets before, but you do not report score the same way you do with regular leaderboard. So my guess is that Unity’s Social.ReportScore does not handle this.

Thanks for your reply.
Then how can I post my score on Game Center Leaderboard in unity?
If you know, please let me know that.

Delete all the Leaderboard Sets and create individual Leaderboards only, not Sets.

I will try and let me know the result as soon as possible.
Regard.

I tried to delete Leaderboard Sets, but the “Delete” button is disabled now.
How can I delete it?
And I think when I registered leaderboards at first, it required to set the Leaderboard Sets.
How about your think?

Try clicking “Remove All Leaderboards in Leaderboard Sets”. This will move them all back into individual leaderboards and not in sets anymore.

You can then delete each leaderboard one by one except the last one (default). For this one you need to click on it, and on the next screen it will say DELETE in the top left corner.

Then start again and add some new Leaderboards but do NOT make them Sets.