how to make a global Screen resolution?

Such as in Portal 2, the VALVe game, where it makes itself fullscreen and works on all computers, huge and small.

Do i make

Screen.fullScreen = true;


Screen.SetResolution(1024, 768, true);

I think the second one works, but does it make the game run in a fullscreen mode without running offscreen on all computers?

The first example you give will switch to full screen. But, what you really want to do is look at the resolutions supported on the machine and choose the largest one, so see The resolutions appear in the area from smallest to largest.