For those of you who are troubled by the app's Game center functionality, try Prime31 the game Center plugin. Simple, effective, fast!!
1. After importing the Prime31 Game Center plugin. There will be a gamecentertestscene inside there are 14 GUI button codes in Gamecenterguimanager. In this first not introduced.
2. First in the editor file There are also some object_c written header files and M files. These scripts need to be added to the unity BUiD into the Xcode file.
3. Be sure to verify before you even enter game Center. The Authentiate (authentication) button for both plug-in GUI. This feature can be used when the game is initialized. Here must be said to apply for an app first, the purpose is to get the bundle ID, and then be sure to set leaderboard (rank) and achievements (achievements), can be set multiple. Have http://www.cocoachina.com/gamedev/misc/2010/1022/2229.html
The post explains the process of setting up Game Center. Can be used for reference.
4. Go back to the GUI button on the prime Game Center. The order is verified first, and then you can see the game Center leaderboard interface after clicking on the Show Leaderboard button. After that, if you want to upload your current score to the leaderboard, load leaderboard data (download the rankings) before you can perform the post score function. After getting RAW score data and get score for me, it is time to get the leaderboard ranking information, and get the leaderboard of my ranking information, which is now studied to this extent.
Summary: This plug-in is good for the ability to connect to Game Center without the hassle of having to internally modify the code to enter information such as Leaderboardid.