I’m trying to use the Apple Unity Plug-Ins Apple.Core and Apple.GameKit to ad Gamecenter achievements to an Apple Unity Plug-Ins mobile game I’m developing in unity. I have found VERY little documentation on how to do this as all of the gamekit docs are for xcode exclusively. Apple does have some video tutorials out which show how to do some very basic setup (all of them incomplete) but I was able to coble together a program which signs the user in to game center.
In a bid to further understand the library I started following the only related tutorial I could find, which is about using the GC access point ( link https://developer.apple.com/videos/play/wwdc2022/10064/ ).
This is the only code linked in the tutorial:
// Authenticate the local player
using Apple.GameKit;
public class MyGameManager : MonoBehaviour
{
private GKLocalPlayer _localPlayer;
private async Task Start()
{
try
{
_localPlayer = await GKLocalPlayer.Authenticate();
}
catch (Exception exception)
{
// Handle exception...
}
}
}
followed by the code for the access point
// Show the Access Point
GKAccessPoint.Shared.Location =
GKAcessPoint.GKAccessPointLocation.TopLeading;
GKAccessPoint.Shared.IsActive = true;
Now, the first block of code works once you include:
using UnityEngine;
using System;
using System.Threading.Tasks;
But the second block of causes the compiler to insist that:
Assets/Scripts/GameCenterHandler.cs(19,5): error CS0103: The name 'GKAcessPoint' does not exist in the current context
If this is caused by an import or namespace error I can’t figure out what namespace I’m supposed to be using.
Has anyone sucessfully used this plugin https://github.com/apple/unityplugins before? Is there anywhere that has comprehensive documentation for using it?