Hi,
I often need to have the "virtual screen size" of the device when I set my UIRoot to be non automatic and set it's size manually.
I'm building all my UI based on an iPad screen size, so I set the UIRoot manual height to 768.
And my screen size is then 1024x768.
If I switch to an iPhone screen size, the screen size is 960x640, but as the UIRoot is manual, the height of my UI is 768.
That also mean that the screen size 960x640 for my UI is not true, and I have to do some calculation to have the width depending on this 768 height (this is : 960x768/640 = 1152px).
Now, what I'm asking is to have two static attributes to UIRoot such as :
public static int virtualScreenWidth;
public static int virtualScreenHeight;
And in the Start or Awake of the script, just do :
virtualScreenHeight = activeHeight
virtualScreenWidth = Screen.width * pixelSizeAdjustement
So we can retrieve easily the UI screen width and height.
What do you think ?