Android Auto scale backgorund for any resolution

hi…i hope to make now a good question because in 2 weeks i didn`t found a good Answard for this…

So, my 2d game in unity for android is almost ready, but…when i test this app on S4, and another 5 divices(with android) my background have a bad scale,

i mean or is too big, or too small
i try to use sprites, GUItexture, code, Quad, cube, ALL stuff…

but is same everytime…

NOTE: my orthographic camere have size set to 10…
Note(2): sorry for my bad english

the best way to fit the gui texture on every screen is :

Try the follwing this…its works for every screen aspect ratio even for both ios android.

Steps:

1.Create a GUITexture. 2.In GUITexture parameter keep pixel inset to 0.(for everything). 3.Adjust the position and scale value in in Transform inspector. 4.then use this script

using UnityEngine; using System.Collections;

public class GUI_Controller : MonoBehaviour { public Vector2 scaleOnRatio1 = new Vector2(0.1f, 0.1f); private Transform myTrans; private float widthHeightRatio;

void Start ()
{
myTrans = transform;
SetScale();
}

void SetScale()
{
//aspect ratio
widthHeightRatio = (float)Screen.width/Screen.height;

//Apply the scale. We only calculate y since our aspect ratio is x (width) authoritative: width/height (x/y)
myTrans.localScale = new Vector3 (scaleOnRatio1.x, widthHeightRatio * scaleOnRatio1.y, 1);

}

}
5.Adjust the scale ratio in script transform… 6.TA ta i…i will works like boss…

thank u…

first you will designed for small device. in script you will type the method in update Screen.SetResolution(480,800,true);
then you will deployed in different devices then automatically resize…