Apple TV and Unity 3D Tips

Unity 3D has been officially supporting the new Apple TV and tvOS since December 2015. Here I’m planning to list anything helpful like gotchas, this page will get updated with more tips as I go.

Apple TV Siri Remote

Reading the Fingers Location on the Touch Pad

By default, the x and y axis of the Siri Remote are reported as values from where the user touched the pad. So if they touch say top left that location is reported as 0,0. This works for some apps but maybe you want to know exactly where the the user touched on the pad to begin with, if it is always 0,0 you have no idea. To change this behaviour you need to set reportAbsoluteDpadValues to true. Also edit your Inputs and make sure you have no dampening on that input (see the menu edit->project settngs->Inputs, for the axis 1 and 2 make sure dampening is zero).

UnityEngine.Apple.TV.Remote.reportAbsoluteDpadValues = true;

 

Check out the Unity Remote class here in the Unity Docs for some more interesting settings.

Submitting Your App to Apple

Set Supported Devices in XCode when Submitting

When you are about to submit your app make sure you have set the “Game Controller” “Capabilities” on what input devices your app supports or you will get a rejection. You must support the remote which is the “micro gamepad”, the Nimbus controller (official joystick) is the “Extended Gamepad” tick box, and if you aren’t using analogue sticks, just dPad, and just two shoulder buttons then you technically support the standard gamepad too (not that many people will use one as the official joystick is the Nimbus).

Check out my other page on setting this info in your XCode project here.

Other references on this – see Apples docs GCMicroGamepad, GCGamepad and GCExtendedGamepad.

extendedgamepad
Extended Gamepad like the Nimbus, lots of buttons and sticks – GCExtendedGamepad
gamepad
Gamepad with no analogue sticks and only two shoulder buttons. It is supported but should not be common at all on Apple TV as the Nimbus “extended gamepad” is sold in the Apple Stores. GCGamepad.

 

Applet TV Pixelated Icons and Top Shelf Images in Unity 3D

By default Unity will compress any asset images you use, this isn’t good when it comes to your Apple TV parallax icon and top shelf image and when looking close on a TV will make them look all artifact ridden. So, go change the images settings in the Unity Editors inspector and make all the PNG files that make up your icon and top-shelf “truecolour”. See the image below for more detail.

 

More Unity 3D Tips – Click Here