When I switch game in window mode, i would like to get the resolution of that window. I tried Screen.width and Screen.heigh, but it gives me the resolution of whole screen, not just that game window. How can I get the game window resolution in windowed mode?
Screen.height and Screen.width gives the actual height/width of the player window, as it seys in the documentaion. If you start in full screen whit a set resolution e.g. of 1600x900 on a screen whit reselutoin 1920x1080 it will scale down the reseluton of the screen to the player window reselution, thus when switching to window mode the screen “goes back” to its original reselution makeing the window mode take up a smaller part of the screen but still it will have its orginal resolution of 1600x900.
Can this be the case? Or other thin I can think of is if you dont call the Sceen.height/ Sceen.width but save them in a variable that is not updated. Hope this helps