@rbxts/device
v0.1.2
Published
Platform/Device helper functions for Roblox
Downloads
35
Readme
Device
A utility to get device information.
Useful for knowing what controls to assign to a user, or a custom experience/UI per platform/device.
GetPlatformType()
Returns the platform type
console
- Is XBoxdesktop
- Is Windows or MacOStablet
- Is iOS or Android tabletphone
Is iOS or Android phone
GetAspectRatio
Gets the aspect ratio of the screen
Returns an array of two numbers, e.g. a 1920x1080 screen will give you [16, 9]