Tools

Simple Mobile Input

Unity Tool

C# Library to make the User Input on Touch Screens simpler to handle. It’s inspired on the default way of Unity of handling user inputs of Keys.

This is an example to detect a right swipe anywhere on the screen:

using MobileInputManagement; // Import the library

// Use it as Unity default Key Presses
if (MobileInput.GetAction (MobileInput.RIGHT_SWIPE)) {
    Debug.Log("Right swipe detected");
}

As simple as that. All of the inputs are stored as static variables, making the code cleaner and easier to read.

The library only support single touches by now:

  • Swipes in all four basic directions.
  • Movement detection in all four basic directions.
  • Taps.

The future versions will add Multi Touch support for the basic actions that can be done on a touch screen (2 fingers swipe, pinch in and out, …).