Hi all,
My current game is an iPhone / iPad app and as it was targeting iOS 14 (due to being developed on a DTK) I thought I’d try to include support for the new GKAccessPoint.
I’ve started creating a new plugin (my first foray into Objective-C).
It’s free of charge as I don’t see any real value in selling it, and I was hoping someone(s) would be able to help test.
It should be as simple as importing the attached unity package, then in your C# script add:
using GameCenterAccessPoint;
To show the access point icon, from one of your scripts call:
AccessPoint.ShowAccessPoint(true, GKAccessPointLocation.GKAccessPointLocationTopTrailing);
This will display the highlights banner first, followed by the user icon in the top left corner.
If you don’t want the highlights banner:
AccessPoint.ShowHighlights(false); //true or false depending on if you want to display highlights banner first
AccessPoint.ShowAccessPoint(true, GKAccessPointLocation.GKAccessPointLocationTopTrailing);
Available positions are:
GKAccessPointLocationTopLeading, //top left
GKAccessPointLocationTopTrailing, //top right
GKAccessPointLocationBottomLeading, //bottom left
GKAccessPointLocationBottomTrailing //bottom righr
Once the access point is visible, you can get the rect that the access point occupies:
CGRect _rect = AccessPoint.GetAccessPointFrameInScreenCoord();
print($"Width: {_rect.size.width}");
print($"Origin X: {_rect.origin.x}");
I will try to add some more functionality, but any feedback would be appreciated.
*update 1 - I’ve added the ability to manually trigger the Game Center popover:
AccessPoint.Trigger();
- note - it does require iOS 14 / MacOs 11
Access Point visible (top right)
Highlights banner
Game Center popover open