I actually made a post before about this, but I had to delete it because Roblox didn’t save my changes.
Also this is my very first community resource post! Please tell me if I am missing something on the post.
Hey guys, today I am presenting you Device Info.
You should use this for analytics purpose, not for the bad habits of detecting the device and making your game controls defaulted to the control that your game uses for keyboard and mouse, gamepad, etc.
Backstory of why did I make this module:
I actually made this because I got intrested on replicating World Builder’s device detection system.
I made this by combining UserSettings(), UserInputService, Camera, and GuiService.
After I made the basics, I decided to extend it further by adding graphics level detection, screen resolution detection, device orientation detection for mobile devices, mobile device type detection (phone or tablet).
Important notes: (OPEN)
I guarantee pc and mobile detection works correctly as possible, console and touchscreen laptops aren’t guranteed to work (I don’t have a console/gamepad and only my dad has a touchscreen laptop which I am not allowed to use)
Bugs can be reported here or at my github (link at my website)
This module can only be used on the client!
Again, you should use this for analytics purpose, not for the bad habits of detecting the device and making your game controls defaulted to the control that your game uses for keyboard and mouse, gamepad, etc.
Pastebin source code: Link
You can credit me if you want to use this module, however you can also no need to credit me, that’s your choice.
I am open for bug reports, tips, and crictisms
Detection on my phone (I started at portrait mode and then switched to landascape):
More coming soon.
DeviceInfo main page:
Is this useful for you?