Overview | Videos | Documentation | Demos | Integrations | API | Support

Doc Home > Input > Mobile

MobileInput does not use the InputManager and instead completely relies on touch input. This touch input can be retrieved with the VirtualButton component. The VirtualButton accepts both presses and swipes. Presses are similar to button presses on the keyboard and swipes are similar to axis input on the keyboard. All of the VirtualButtons should be placed under a common GameObject which contains the VirtualButtonManager. This VirtualButtonManager component will enable or disable the VirtualButtons according to the PlayerInput settings. No extra work is required to get mobile controls to work the same PlayerInput class can be used to get both standalone and mobile input and most components do not even need to know that the game is running on a mobile device.

Note: for MobileInput to work correctly, make sure you first import the source code.

<- Standalone
Component Communication ->