Input devices on tvOS
Understand how to support the Apple TV Remote and Made for iOS (MFi) controllers.
읽는 시간 3분최근 업데이트: 한 달 전
tvOS supports two primary input devices: the Apple TV Remote and Made for iOS (MFi) controllers. This page provides an overview of the input devices and how to support them in your Unity application.
Apple TV Remote
The Apple TV Remote is a multi-purpose input device that works as a traditional menu navigation controller, app controller, and as a touch gesture device. Unity routes Apple TV Remote input to corresponding Unity APIs performing no further processing on the input. Your application might need some adjustments to its input scheme to leverage the Apple TV Remote’s specific input features. For example, your application can treat it as a traditional application controller with one analog axis and an extra action button. For specific Apple guidelines on using the Apple TV Remote, refer to Remotes.
Apple TV Remote feature reference
Use the following reference table to understand and access specific TV Remote features when using the Input System package.
Feature | Description |
|---|---|
| Touch area | To access touch information on the Apple TV Remote (first generation) use |
| Touch area press | A press of the touch area on the Apple TV Remote (first generation) maps to Gamepad button A. |
| Swipe to the edge of the remote | A swipe on the Apple TV Remote (first generation) generates directional pad (D-pad) up/down/left/right button presses. |
| Clickpad | The Clickpad on the Apple TV Remote (second generation) generates directional pad (D-pad) button presses. Pressing the centre of the clickpad generates a Gamepad button A press. |
| Play/Pause button | A press of the Play/Pause button generates a button X press. |
| Menu button long press | A long press calls the tvOS task switcher. You can’t override this behavior. |
| Menu button short press | You can process short taps of the menu buttons using UnityEngine.tvOS.Remote.allowExitToHome. When allowExitToHome is true, pressing the Menu button on the remote causes the application to exit and return to the system home screen. This allows users to quickly navigate away from the application. When allowExitToHome is set to false, the application handles the Menu button press. In this case, define custom behavior for the button such as opening an in-app menu or performing another action. |
| Gyroscope | Gyroscope functionality isn't supported when developing for tvOS with Unity. |
| Accelerometer | Accelerometer functionality isn't supported when developing for tvOS with Unity. |
Apple TV Remote Scripting API
You can control the Apple TV Remote operational modes via a dedicated API. For more information, refer to Remote.
Made for iOS controllers
Unity supports Made for iOS (MFi) controllers when developing for iOS and tvOS. MFi devices are a set of controllers and devices that are certified to work across Apple devices. MFi controllers offer out of the box input mappings, or you can set up custom mappings using the Unity Input System package. For more information, refer to Remap buttons for a MFi controller.