x


How do I set an Android applications resolution?

How do I set the resolution for a Unity Android application?

more ▼

asked Mar 18 '11 at 03:57 PM

RoflHarris gravatar image

RoflHarris
971 5 8 13

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

You can set the resolution of your application by calling Screen.SetResolution which is documented here:

http://unity3d.com/support/documentation/ScriptReference/Screen.SetResolution.html

If you add this to a scripts start function and attach it to the Main Camera this will force the application to display full screen at a given resolution.

more ▼

answered Mar 18 '11 at 03:58 PM

RoflHarris gravatar image

RoflHarris
971 5 8 13

(comments are locked)
10|3000 characters needed characters left

Void OnGUI() { GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(1.0f * Screen.width / 1024, 1.0f * Screen.height / 768, 1)); . . . . }

more ▼

answered Sep 19 '12 at 07:52 AM

Lav patel gravatar image

Lav patel
101 6 9 12

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2482
x485
x381

asked: Mar 18 '11 at 03:57 PM

Seen: 8679 times

Last Updated: Sep 19 '12 at 07:52 AM