- Home /
Question by
mvx · Apr 02, 2012 at 01:35 PM ·
touchscreengetmousebuttonwin7
Win7 elo Touchscreen GetMouseButton TimeDelay
Hi
I'm using Unity3.5 Win7 and an elo Touchscreen.
While using Input.GetMouseButton I press the Finger onto the touchscreen and then I have to wait 4 or 5 seconds until Input.GetMouseButton reacts.
Example: I add this script to a cube:
using UnityEngine;
using System.Collections;
public class ChangeColler : MonoBehaviour {
Color cDefault = Color.green;
Color cActiv = Color.red;
Material myMat;
void Start () {
myMat = renderer.material;
myMat.color = cDefault;
}
void Update () {
if(Input.GetMouseButton( 0 ))
{
myMat.color = cActiv;
}
else
{
myMat.color = cDefault;
}
}
}
After pressing the touchscreen I have to wait 4 or 5 seconds until the Cube changes the Color.
I have the same Problem with GetMouseButton and GetMouseButtonDown.
I don't have this delay while using the mouse. (instead of the touchscreen)
Any idea of getting rid of this Timedelay?
Thanks.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613065811im_/https://answers.unity.com/themes/thub/images/avi.jpg)