I am having a problem with the Game Center integration in MonoTouch, whereby the Game Center sign-in view is loading, but it is erasing any textures currently loaded. If I comment out the PresentModalViewController line, then the game center sign in form doens't appear, but the already-loaded textures stay in memory and work. I'm using the following code to display the game center view:
GKLocalPlayer.LocalPlayer.AuthenticateHandler = (ui, ErrorCode) =>
{
if (ui != null) {
Debug.WriteLine ("GK Not authenticated, presenting login");
PresentModalViewController (ui, true);
} else {
Debug.WriteLine ("GK Checking Authentication");
bool authenticated = GKLocalPlayer.LocalPlayer.Authenticated;
if (authenticated)
Debug.WriteLine ("Game Center Authenticated. " + GKLocalPlayer.LocalPlayer.DisplayName);
else
Debug.WriteLine ("Game Center Not Authenticated. " + GKLocalPlayer.LocalPlayer.PlayerID + " " + ErrorCode.ToString());
}
};
Has anyone seen this issue before, and if so, what is the solution to display the game center sign in page, but keep the loaded textures?