- Home /
Problem with P.C. touchpad.
Hi everybody!
First of all, my apologies because my English is not good. :D
Yo hablar Español (I speak Spanish). <3
I have a problem with my P.C. touchpad.
Using a simple C# script:
private void Update
{
if (Input.GetMouseButtonDown(0))
{
Debug.Log("Mouse Button Down");
}
else if (Input.GetMouseButtonUp(0)
{
Debug.Log("Mouse Button Up");
}
}
If (I use my mouse || I use my touchpad left button )
//Unity detects mouse button down and mouse button up.
else if ( I double-tap fast using my touchpad)
//Unity doesn't detect mouse button up.
How can I fix that? x"(
Answer by HenryStrattonFW · Apr 16, 2018 at 12:30 AM
Try getting rid of your else statement, or logging out the Time.frameCount value when you detect button down. I recon your double tap is just happening too fast so unity is seeing the down/up events as occurring on the same frame, and your else logic results in only the down being logged out.
Your answer
![](https://koobas.hobune.stream/wayback/20220612160711im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to click only one once? 0 Answers
Unity mouse input gradually becomes off 0 Answers
Can I change GUIButton behaviour? 1 Answer