低調の美國生活

各種疑難雜症

在遊戲中放入Game Center功能

image

We are using Prime31 Game Center Plugin to implement Leaderboard functionality in the game. This allows user can show off their score on Apple’s Leaderboard. Out goal will be to be able to send a score to the leaderboard and check our latest score on leader board.

GOAL

  • Able to send score to the Leaderboard
  • Able to check the score on Leaderboard

 

Make Sure Our Game (App) is at “Prepare to Submit” status (iTunes Connect)

  • Go iTunes Connect >Create a new App

Create a Leaderboard on Game Center (iTunes Connect)

  • Get the Leaderboard ID

 

Initialize in Unity (Coding)

  • Copy & Paste the code from demo script
  • Add GameCenterEventListener to the scene

 

Send the Score (Coding)


 

Check the Leaderboard (Coding)


 

Device Settings (Activate Sandbox)

  • Log In Game Center as a Test User
  • Make sure Settings / Game Center / Sandbox is activated (otherwise you will see “user…not log in…” error message on your device)

 


發佈於 1月9日2015年