-
Notifications
You must be signed in to change notification settings - Fork 1
Game Center UI
Game Center provides two distinct types of user interface elements for you to use in your game. The first type is intended to be displayed modally by your game, covering your own game’s user interface and temporarily interrupting the normal flow of your game. Typically these user interface screens allow a player to interact with content loaded from Game Center or to perform Game Center tasks. When the player finishes interacting with one of these screens of content, your game shows the next appropriate screen, either by returning to one of your game screens or by advancing to another screenful of content.
In iOS, a fullscreen user interface is packaged as a view controller, and follows the standard conventions of view controllers on the system. One of your game’s view controllers is expected to present these view controllers when needed, and later respond when the view controller is dismissed. On OS X, a special class provided by Game Kit provides a similar infrastructure so that your game can present the user interface.
There are few configurations you can use to display the Game Center view controller.
using SA.iOS.GameKit;
...
ISN_GKGameCenterViewController viewController = new ISN_GKGameCenterViewController();
viewController.ViewState = ISN_GKGameCenterViewControllerState.Achievements;
viewController.Show();
ISN_GKGameCenterViewController viewController = new ISN_GKGameCenterViewController();
viewController.ViewState = ISN_GKGameCenterViewControllerState.Challenges;
viewController.Show();
using SA.iOS.GameKit;
...
ISN_GKGameCenterViewController viewController = new ISN_GKGameCenterViewController();
viewController.ViewState = ISN_GKGameCenterViewControllerState.Leaderboards;
viewController.Show();
using SA.iOS.GameKit;
...
ISN_GKGameCenterViewController viewController = new ISN_GKGameCenterViewController();
viewController.ViewState = ISN_GKGameCenterViewControllerState.Leaderboards;
viewController.LeaderboardIdentifier = "itunes.leaderboard.id";
viewController.LeaderboardTimeScope = ISN_GKLeaderboardTimeScope.Today;
viewController.Show();
The second type of user interface element is a banner that is displayed for a short time to the player. Afterwards, the banner automatically disappears from the screen. While players can interact with some banners, usually banners are simply used to display a message to the player. Game Center displays many banners on behalf of your game, but you can also present your own banners to the player if your game has information you need to display.
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Getting Started
- Authentication
- Game Center UI
- Leaderboards
- Default Leaderboard
- Achievements
- Saving A Game
- Access Point
- iTunes Connect Setup
- StoreKit Initialization
- Purchase flow
- Receipt Validation
- Store Review Controller
- Storefront API
- Subscription Offers