screen resolution in android

Hi there
i have set custom manifest for my android game in unity
in manifest i use

<supports-screens android:largeScreens="false" android:normalScreens="false" 
      android:smallScreens="false" android:resizeable="false" android:anyDensity="false" />

for disable streching my game to screen size.because when do strech or scaling to output size, the game is going to slow.
after disable strech my screen like this :


my target is android device that show out put on monitor
i have the resolution : 1280 * 720
how can i set the camera or resolution or any thing else,to become my screen fit
i use unity 3.5.x
tnx 4 adv
and sorry 4 bad english

In Unity, the camera has various properties for the viewport. One of them is “pixelRect”, which gives you the viewport in pixels.

Another is the property “rect” (in the Inspector of Unity’s Editor it is called viewport rectangle). This property allows you to specify where on the screen the camera viewport appears and how much of the screen it should take up.

Note that “rect” is normalised. By default, the x & y position is set to 0, so the camera starts drawing from the corner. The width and height are both 1, which translates to 100% of the screen size.

To get your desired resolution (in Unity) you could do this for the width:

// desiredWidth being your desired width, presumably 1280?
camera.rect.width = desiredWidth * Screen.width;

And you could do the same for the height. To centre the screen you would obviously have to play with the x and y coordinates of the camera’s rect and do some offsets using half the width/height for x/y respectively. Hope this answers your question.

Cheers

Bilo