so when i try to print out these values when using “Samsung Galaxy Tab S2” i get resolution value of 1152x1536 while the original is 1536x2048. I’m putting 2 screenshots below one from defold while using code from above and the other is one is from Unity build.
Hmm, what values do you have in game.project? When do you call render.get_window_width() and render.get_window_height() and pass those values on to another script? In the init() function in the render script or every frame?
in game project i have 1080 width and 1920 height i checked this on ipad mini 2 and everything seems to be working. So i call these functions in render script init and then pass to gui script nodes.
I have a similar problem with Huawei P6. Its resolutions is 1280x720 but render.get_real_width() said that it is 1196x720. I think it happens because there are on-screen navigation buttons:
Apparently an issue in Android 6 and 7 that has not been fixed yet. The height of the status bar (or nav. buttons bar?) gets subtracted from the display height in some instances
And with the last build it broke down again -_-. Just one weird thing, that other devices output right info, except for galaxy tab s2 which is very weird…