I have an iOS Unity project which has been built and now I have a Xcode project. Now I want to Implement Gamecenter but I just can’t seem to find the rootviewcontroller to show the GKLeaderboardViewController. On a native app, I would simply do the following:
#import "AppDelegate.h"
AppDelegate *_delegate = [UIApplication sharedApplication].delegate;
[_delegate.viewController presentModalViewController: leaderboardController animated: YES];
But Unity messes up the code and I only have an AppController.h and an AppController.mm
Anyone has managed to resolve this?
Looking inside the AppController.mm you can find:
So you can get root view controller by calling