Discord
Login
Community
DARK THEME

Touch Keys

I would like to make a game that is compatible with computer and mobile, so I need a way to:

  1. Detect if the device is a computer or mobile.
  2. 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!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community