Sceen size and GUI issuesI

Hi guys,

How do you get the correct screen size depending on whether the build is set to stand alone or web player?

The problems I having are;

1: If I use Screen.width() and Screen.height() to get the size of the screen, it works perfectly in the editor but unity doesn’t give me the correct screen size in the web player so my GUI elements are off screen.

2: It also seems like the canvas of the web player covers parts of the game based on the resolution. Shouldn’t the game screen be scaled somewhat and the game elements adjusted appropriately?

Please how do I fix the problems?

how do you do that to set the web player resolution based the resolution of your screen?

This should be under the GUI thread, but even more importantly, its been discussed before. Lets say you have a health bar on the bottom - left of the screen, and no matter what resolution whether it be 768x1024 or 1900x1200, you can always adjust it using a code. You find the height/width using the code you mentioned, and you divide whatever number (depending on where it is on the co-ordinates) and then change the size accordly aswell. So basically you could have 4 variables, X/Y size, and X/Y position.

You can change the webplayer res in the unity settings under player in the edit tab. Im not sure how to put it accordingly to your highest res, I think if you put 1900x1200 (being one of the highest res for monitors out there atm) it should work for anything lower than that res if you know what i mean.

we am not talking about the placement of the GUI element here, nowhere is this mention here.
we are talking about the project resolution and screen resolution.