
However, if you want to get input from multiple touches in your Action, you can bind to individual touches by using Bindings like /touch3/press. This gets input from the primary touch, and any other non-touch pointer Devices. To do this, bind to the pointer Controls, like /press or /delta. You can use touch input with Actions, like any other Pointer Device. You can use this to detect double- and multi-tap gestures. Reports the number of consecutive tap reports from the OS. This allows you to distinguish individual touches.Ī Control that reports the current TouchPhase of the touch.Ī button Control that reports whether the OS recognizes a tap gesture from this touch. The size of the area where the finger touches the surface. Normalized pressure with which the finger is currently pressed while in contact with the pointer surface. The time when the finger first touched the surface. The position where the finger first touched the surface. The difference in position since the last frame. If you need an API that only represents active touches, see the higher-level EnhancedTouch.Touch class.Įach TouchControl on the Device, including primaryTouch, is made up of the following child Controls: Control This array has a fixed size, regardless of how many touches are currently active. The touches array contains all the touches that the system can track. PrimaryTouch is always identical to one of the entries in the touches array. This is usually the first finger that touches the screen. The primaryTouch Control represents the touch which is currently driving the Pointer representation, and which should be used to interact with the UI. Each of these represents a potential finger touching the Device. The primary touch drives the Pointer representation on the Device.Īn array of touch Controls that represents all the touches on the Device.Ī touch screen Device consists of multiple TouchControls. ControlsĪdditional to the Controls inherited from Pointer, touch screen Devices implement the following Controls: ControlĪ touch Control that represents the primary touch of the screen. To query the touch screen that was last used or last added, use Touchscreen.current.

Touch screens are based on the Pointer layout.


Touchscreen DeviceĪt the lowest level, a touch screen is represented by an InputSystem.Touchscreen Device which captures the touch screen's raw state.
#INCONTROL UNITY TOUCHPAD TAP WINDOWS#
Touch input is supported on Android, iOS, Windows, and the Universal Windows Platform (UWP).
#INCONTROL UNITY TOUCHPAD TAP UPDATE#
If you read out touch state from Touchscreen directly inside of the Update or FixedUpdate methods, your app will miss changes in touch state. If you want to read out touches similar to, see EnhancedTouch. Note: You should not use Touchscreen for polling. high-level support implemented in the EnhancedTouch.Touch class.low-level support implemented in the Touchscreen class.
