just thought I’d make my game center code available.
It sends scores, achievements, achievement progress, and also includes the default view for scores and achievements. Although the views will report latest scores/achievements across devices, I haven’t exposed any retrieval methods to get this data back to unity (wasn’t necessary for the project I built this for). If someone wants to add that feel free; no comments in the code but its pretty clear.
Code is released under MIT license so you can do whatever you want with it. Be great if you could stick a link back to http://jnamobile.com in your credits or web page but its not required. Also cool if you let me know if you are using it.
Although I may respond to posts to help you get this going there’s no guarantees. If you want that try Prime31’s great plugins.
Basically to get it going:
Copy the file from “CopyInToPluginsFolderInUnity” folder into plugins folder
Build project (it will fail).
Copy the files from “CopyIntoXCodeProject” folder into build dir.
Add the GameCenter Framework to the XCode project.
Rebuild.
You can now call the gamekit functions from java or c# scripts.
EDIT: It’s awesome that I spelled game center wrong in the title too
EDIT: Just a note that the MIT license requires you to include a copy of the MIT license in your software (you don’t have to release YOUR code under the license, just have it there noting that part of the software falls under that licesne). However if you have any issues with this just ask and I will waive that requirement for you.
Put gamekitjnabinding.cs into Plugins folder in unity, copied gamekitjnabinding.m, gamekitjna.h and gamekitjna.mm into xcode main project directory, then dragged in gamekitjnaview.m and.h into Xcode project main directory.
Ive got game centre activated for the version of the game I’m working on, but still get those errors above
okay when running straight to the phone i don’t get the errors, but the game centre doesn’t work
i could take print screens of anything you want to check, just let me know