Is there a way to determine if the player is using a touch screen device for Windows Store Apps?
I tried using Input.touchCount > 0 but on my test device, this is check never returns true.
Is there a way to determine if the player is using a touch screen device for Windows Store Apps?
I tried using Input.touchCount > 0 but on my test device, this is check never returns true.
This one was fixed, but unfortunately not yet released.
For now you can use windows API directly:
Thanks, it looks like that will just tell me if the device supports touch, rather than an actual touch event being detected?
I was hoping to use this check to work out if on screen controls are required or if the game should default to mouse only input.
What I didn’t want was to force a player who has a touch screen use it, if they would prefer to play with the mouse. Similar to how the players controller preference is detected by which controller is used to press start.
Why not add an option so your user could choose how he wants to control it then?
I guess I could.
After going through the XBILG certification process, I guess I’ve got used to trying to make it as automatic for the player as possible.
I was just going to use mouse as default and only override once a touch event was detected.
You can check for mouse presence using this API:
If you start up in touch screen mode, GUI buttons work with either, so it is easy for the user to switch between them. You just have to remember to always provide a on-screen clickable button just in case user switches to non-touch while in touch mode.