Quick answer: Bind your actions to <Pointer>/press (covers Mouse + Touch + Pen) instead of <Mouse>/leftButton. Or add an explicit <Touchscreen>/primaryTouch/press binding alongside the mouse one.
A Unity mobile game uses the new Input System with a “Tap” action bound to <Mouse>/leftButton. The editor with mouse works perfectly. On Android device, taps register nothing. The phone’s touchscreen is treated as a separate device the action doesn’t bind.
The Pointer Abstraction
The Input System has a Pointer base class that Mouse, Touchscreen, and Pen all derive from. Bindings written against <Pointer> match any of them. Bindings against the concrete class only match that class.
Fix 1: Bind to Pointer
Open the .inputactions asset. For the Tap action:
- Path:
<Pointer>/press(or for position:<Pointer>/position) - Use Interaction: Press (default trigger on press)
Now Mouse left button, Touchscreen tap, and Pen tap all dispatch through this single binding.
Fix 2: Add Explicit Touchscreen Binding
If you need to keep Mouse-specific bindings (e.g., for right-click), add a second binding to the same action:
- Binding 1:
<Mouse>/leftButton - Binding 2:
<Touchscreen>/primaryTouch/press
Both paths now dispatch to the same callback.
Fix 3: Enable Touch Simulation for Editor
For testing touch-only logic in the Editor without a device:
using UnityEngine.InputSystem.EnhancedTouch;
void OnEnable() {
EnhancedTouchSupport.Enable();
TouchSimulation.Enable();
}
Mouse clicks now also generate Touchscreen events. Tests Touchscreen-bound actions in the Editor without a phone.
Fix 4: Per-Touch Position
For multi-touch (pinch, etc.):
using UnityEngine.InputSystem.EnhancedTouch;
foreach (var touch in Touch.activeTouches)
{
if (touch.began) DoSomething(touch.startScreenPosition);
}
EnhancedTouch.Touch.activeTouches gives you per-finger data, similar to legacy Input.touches. Cleaner than action bindings for multi-finger gestures.
Diagnosing
Open Window → Analysis → Input Debugger on the device or via remote debugger. Tap the screen — if Touchscreen events appear but your action doesn’t fire, the binding doesn’t include touch. Fix per above.
Verifying
Tap the screen on a real device. Your Tap callback should fire. Check the Input Debugger’s Listeners tab — the action should show Touchscreen as a valid source.
“Mouse and Touchscreen are different devices. Use Pointer to cover both, or bind both explicitly.”
Default to <Pointer> bindings in any project that may ship to multiple platforms — saves rewiring later.