/GKNativeExtensions

Provides GameKit bindings for Mono interoperability. Works on Unity (tested with 2018.3).

Primary LanguageC#Mozilla Public License 2.0MPL-2.0

GKNativeExtensions

What is this?

GKNativeExtensions is a small package wrapping the missing features of Unity's Game Center integration. This package mainly provides the necessary cloud save feature.

How to use the extensions?

Get the .unitypackage from the latest release and import it in your project. The GKNativeExtensions.cs file contains all the interfaces you can use for your project, each with an appropriate callback.

Keep in mind that the native code may return at odd times during execution, so it is a good idea to have a piece of code to wait for the next Update() call to make sure all unity data structures are available, something like this does the job nicely.

Another important thing to note is - this requires the use of the iCloud entitlements in your app, and requires an iCloud container. Set it up in the capabilities section of your XCode project.