I would like to have information about the device so that we can create UIs/ Change gameplay elements based on the viewport. This allows us to create responsive User Interfaces.
[size=4]What is needed[/size]
Allow us to view the Device information. What is the current Window of our user. What is the Width, What is the Height, did we lost focus on our window ?
What is the resolution of our screen. Why ? I want to give higher quality images if the view port has that graphic capabilities.
[size=4]Why[/size]
I personally am looking into UIs based on a grid. The thing is that I’m currently listing to the AbsoluteSize of the ScreenGui. This isn’t ideal, and I would like to give my playerbase a UI that is looking great on there device.
You can use the ViewSizeX and ViewSizeY properties of PlayerMouse to get the viewport. As for resolution, everything is specified in pixels, so I don’t think you have to worry about that since the engine does it for you.
True for a part. But I wish to know more information regarding the device. Are we on a Mobile device, are we on a tablet or at a PC.
And yes, I can figure this out. But comparing the resolution between Mobile and tablet is become quite hard. (Since they are coming really close in the last tablet / phones) Something like Player.Device would be great !
Yeah in most cases perhaps, but as Ben put it: “This is better than trying to use ScreenGui.AbsoluteSize or something like it because the ScreenGui object is not guaranteed to report the 3d rendering size of the camera.” And so it’s more of an official support.