I need help with Screen.SetResolution

Here’s my code. I attached this to my camera:
#pragma strict

function Awake ()
	Screen.SetResolution(1024, 768, false);

function Update (){
//Screen.SetResolution(1024, 768, false);

The problem is that nothing changes. I have set the game view to 4:3, 16:9, 16:10, standalone (1024 x 768), but nothing changes when I hit play. I then tried this code straight from the docs to get my supported resolution:

var resolutions : Resolution[] = Screen.resolutions;
		// Print the resolutions
		for (var res in resolutions) {
			print(res.width + "x" + res.height);

and all I get is 640 x 480. I have no idea what that’s about. My screen is certainly capable of more than just 640 x 480. All this is kind of secondary though. All I want is to lock the resolution so that everybody gets the exact same field of view during gameplay, be it on an 18" monitor, a 24" monitor, 32" tv, or a 50" tv.

The field of view is the vertical angle, so it is independent from the resolution. The resolution changes the amount of pixels, but the picture you see is the same. If you want to calculate horizontal FOV, check here.

In your code you are setting the application in windowed mode, that is why your screen’s resolution does not change. You have to set it fullscreen if you want the app to change the screen resolution. Set the third parameter to true: Screen.SetResolution(1024, 768, true);