Mobile devices are the primary target for Android applications. Unity provides an Input System package to handle user input on Android devices. This input solution is enabled by default for new projects.
Note: Unity also supports the legacy Input ManagerSettings where you can define all the different input axes, buttons and controls for your project. More info
See in Glossary for existing projects. You can choose between the two input solutions through Android Player settings > Other Settings > Configuration > Active Input Handling.
The Input System package supports a variety of input devices on the Android platform, including mouse, keyboard, pen, touchscreen, sensors, joystick, and gamepads. For more information, refer to Supported input devices in the Input System package documentation.
For additional input features on Android, refer to the following sections:
Android devices automatically display an on-screen touchscreen keyboard when users select editable UI elements, such as Input Fields created using UGUI, or TextField controlsA TextField control displays a non-interactive piece of text to the user, such as a caption, label for other GUI controls, or instruction. More info
See in Glossary created using UI Toolkit, or IMGUI. Unity automatically activates the Android keyboard and handles input from it. If you want to manually activate and configure the Android touchscreen keyboard behavior, refer to Mobile Keyboard.
Unity provides gamepad support allowing users to use physical controllers when playing your Android games. You can configure the level of gamepad support in the Android Player settings > Other Settings > Configuration > Android Gamepad Support Level. To handle gamepad input, use the Input System package APIs.
Unity also supports rumble with gamepad controllers on Android devices, allowing controller vibration in response to in-game events and improving the overall gameplay experience. To implement rumble support, use the Input System package APIs.
Notes:
Handheld.Vibrate API.