Created
July 7, 2011 10:12
-
-
Save doskoi/1069240 to your computer and use it in GitHub Desktop.
Unity3D GUI Resolution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function OnGUI() { | |
var screenScale: float = Screen.width / 480.0; | |
var scaledMatrix: Matrix4x4 = Matrix4x4.identity.Scale(Vector3(screenScale,screenScale,screenScale)); | |
GUI.matrix = scaledMatrix; | |
// then do the rest of your GUI as per normal, using the 480x320 screen size you had for your standard res iPhone app | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment