Resolutions

Hi guys, a have i little doubts about the resolutions. I’ve created my application, and then i run it on 800x600, the GUI elements was “messed”, how can i do to make one code to care about all resolutions?

Even i try to do this, i failed D=

void Start() {
screenX = Screen.width/2;
		screenY = Screen.height/2;
}

void onGUI() {
      public void createBox(float left, float top, float width, float height, string content) {		
		GUI.Box(new Rect((screenX-screenX)+left, (screenY-screenY)+top, width, height), content);	
	}
}

Thanks guys!

screenX-screenX) that will always be zero, may as well write 0… or 800-800…

i think the info you need is here: