- Home /
Tap Control on Android
Can anyone can tell me how to use the tap control for android? Is the tap control on iOS similar to android?
Answer by CodeMasterMike · Dec 17, 2012 at 09:57 AM
In Unity,a finger input called touch. So, in your input class, you have a function called "GetTouch", use that function to get your touches/taps. A "touch" is really a struct with information you may need, when the user touches the screen.
See touch struct documentation.
A touch is the same on both Android and on iOS.
Here is a simple example:
Update()
{
if (Input.touchCount > 0)
{
// code here for what you want to do when screen is touched
}
}
For more information, read about the input-class and the GetTouch function in the documentation.
Good luck!
Your answer
![](https://koobas.hobune.stream/wayback/20220613085536im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
Help with iphone/android touch controls 2 Answers
Detect touch on a specific GUITexture 3 Answers
Dual joystick Position always resets on playing 1 Answer
Swipe menu, problem! 0 Answers