Touch Keys
I would like to make a game that is compatible with computer and mobile, so I need a way to:
- Detect if the device is a computer or mobile.
- Enable or disable touch keys depending on what it is.
Could the screen length somehow be used to determine the type of device? Does anyone know how to do this?
You can use system.inputs.keyboard
to check whether the device has a keyboard. But I'll need to test it to know for sure. Your could also in theory use system.inputs.touch
, but some computers have touchscreen.
Wow it works!
I think I've made the simplest project in microStudio, here it is:
https://microstudio.dev/i/Socks_Entertainment_Studios/mobilepcdetector/
Thanks a lot!