Windows 10 Touch Screen input stops triggering onClick events
Hello,
I have a weird problem I could use some help with. I have a working game that is run on Windows 10 PCs, driven by a touch screen. All works perfectly for between several minutes and several hours. Then, touch inputs on the touch screen stop generating onClick events for all UI buttons.
At first, all works well. A touch on the UI button happily generates the onClick event, which is added simply as follows:
Button startButton = startButtonGO.GetComponent<Button>();
startButton.onClick.AddListener(nextLevel);
But after a while, no touches trigger any onClick event in any scene. Nothing has changed with the layout. For example, there are no objects in front of the button.
The game continues to run - it has not crashed. It is running all items in the Update function. It just isn't responding to further touch inputs.
The Game can be controlled endlessly using a physical mouse. This generates no problems at all. The problems are only shown when controlled by a touch screen.
The game is part of an installation with several such panels and PCs. They all exhibit the same problem.
I would greatly appreciate any help or pointers.
DC
Did you ever find a solution for this? Having a similar problem, except in this case touch stops working completely - both in Unity and in Windows in general. After Unity has been started, Windows must be restarted to get touch working again.
@Boaneo Sadly I haven't been able to solve this. Touch / click input is only restored after the game is restarted. Windows touch / click input is unaffected.
In your case, try looking into power saving on the USB port to which your touch screen is connected. Perhaps windows is putting it to sleep?
Darn, but thanks for the suggestion, I guess power saving could be an issue - I'll make sure it's all turned off.
Though, it would be strange how that would only be a problem after running Unity. It's almost as if Unity does something that kills the touch drivers.
Interestingly I am getting a more rudimentary problem with EventSystem OnClick(). Apparently, it does not trigger on a $$anonymous$$acintosh. Or at least a $$anonymous$$acbook. Anyone else ever run into that?
I dont have a macbook but I am getting reports from those testing it out on one that clicking on my UI buttons does nothing for them. Though my other logic that detects for mouse button input manually works fine.
Hey guys! After two years using unity 2019 I'm having the same trouble but only appears until now, on a capacitive touch screen. I wonder if any of you have found a solution?