Orthographic Static 2D Background - IOS/Iphone 3,4 & 5

Does any man, women or child now how I would go about setting a simple 2D background that doesn’t move but adapts to its screen resolution? Iphone - 320480,640960, 640*1136? (Portrait)

I know there script that asks if(Screen.width == the iphone specified){

but is there a simpler way of doing this kind of like a guiTexture set to 1, 1, 1 which adapts to its screen size?

Help would be saaaaawweeeeet!

There’s a really simple way of doing this.

    GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),yourTexture);

another way om making sure your game fits all resolutions is by designing your gui for a specific resolution(by example 800 * 600), and then using GUIMatrix, which automatically scales everything made with unity’s OnGUI function.

now, i don’t know exactly how GUIMatrix works but this should do the trick:

var horizRatio = Screen.width / 800;

var vertRatio = Screen.height / 600;

GUI.matrix = Matrix4x4.TRS (Vector3(0, 0, 0), Quaternion.identity, Vector3 (horizRatio, vertRatio, 1));

Keep in mind when using GUIMatrix that your designing for a specific resolution and you dont have to use calculations such as Screen.width/2 + offset or something like that.

instead just give the exact position values and size values, the GUIMatrix wil do the rest.

Hope this helped !:slight_smile: