Hi, I'm using the Unity plugins to access Game Center; there's a button in our UI that I want to use to open the Game Center dashboard on a particular leaderboard. The code for that is as follows, adapted from the GameKitSample.cs file:
var leaderboard = leaderboards.First(l => l.BaseLeaderboardId == MY_LEADER_ID);
var gameCenter = GKGameCenterViewController.Init(leaderboard, GKLeaderboard.PlayerScope.Global, GKLeaderboard.TimeScope.AllTime);
await gameCenter.Present(); // game never returns from here
Debug.Log("Back from Present()...");
gameCenter.Dispose();
I can play the game, hit the button, and view the Game Center dashboard, opened to the given leaderboard as expected. However, when I quit the dashboard (hitting the X in the top-right corner), the dashboard fades out, but the game is now unresponsive.
I did notice that elsewhere in GameKitSample.cs, we have the following:
var match = await GKMatchmakerViewController.Request(request);
match.Delegate.DidFailWithError += OnRealtimeMatchDidFailWithError;
Digging around for help with GKGameCenterViewController, I did notice that most solutions involve giving the viewcontroller a callback, but in the Unity plugin I see no Delegate listed for GKGameCenterViewController. Is this class missing the delegate, & therefore missing the callback that would dispose of the view?