Game Center

The following Game Center API is available with IOS Native on TvOS platform.

Setup and init Game Center as you normally do with IOS platform. See the Initialize Game Center Guide.

With TvOS the following API is available for you:

There is some usage difference between IOS and TvOS platforms.

  1. You can't show specifically Achievements UI,  Leaderboard UI or Leaderboard Data UI by its Id. You can only show single Game Center window. Any action like Show Leaderboards / Achievements will now trigger standard TvOs Game Center interface.
  2. The Leaderboards data will not appear inside the TvOs Game Center interface until  Xcode setup action is completed which is described bellow:
    1. Select Images.xcassets in Xcode project
    2. Right-click under listed files and from the menu pick Game Center->New AppleTV Leaderboard.
    3. Add your images there.
    4. Select Leaderboard and on the right pane pick edit view. Find there “Identifier” field and enter you leaderboard id there.
    5. If after these modifications your asset compilation starts to fail, try disabling “On Demand Resources” in Xcode “Build Settings”.

We would also recommend reading the Building games for Apple TV Unity Guide before you begin. 

Know issues:

Achievements progress

When you are submitting your achievements progress, the following log message may appear:

no bundle for bundleID: (null)

This message is harmless, however, there is no explanation from Apple about message source. See the Developers Forum for more information.

Input

You should understand that unlike mobile games, when modal overlay covers the screen (like ,for example, popup or achievements window appears) this overlay is not blocking input from the remote which means your game or game menu will still read and respond to TV remote input.

Here is a workaround that we can suggest.

  1. When you are presenting any modal view like Show Achievements / Leaderboards. Lock your input listeners.
  2. Subscribe to the GameCenterManager.OnGameCenterViewDismissed event
  3. Enable input listeners once GameCenterManager.OnGameCenterViewDismissed has been fired and unsubscribe from the event.