adjust GUI position&scale in different screen resolution

I know there is one way that set all the values of GUI controls with Screen.width or Screen.height.
like Rect(Screen.width*0.03,Screen.height*0.02,Screen.width*0.04,Screen.height*0.04);
while this will result much calculation when you want to show the picture completely,'cause you should know the picture.width/Screen.width,picture.height/Screen.height when you want to set the Rect.width to be equal to the picture.width,or set the Rect.height to be equal to the Picture.height.like this:

Rect(Screen.width*0.03,Screen.height*0.02,picture.width,picture.height)

using Screen.width &Screen.height locate the GUI controls’ position is OK, while the scale seem to be not satisfied.
Is there any better way to solve this question perfectly?
how do you locate and set scales in GUI with different resolutions in ur game?

thx all ur help!!

nobody?

Use GUI.matrix property and set it to proper scale matrix.
First, you set up fixed screen dimension in which you put your controls on screen (with fixed positions/sizes) and then you set scale matrix (to be exact - it should be before any control you draw in OnGUI function)

GUI.matrix = Matrix4x4.Scale(Screen.width / FIXED_WIDTH, Screen.height/FIXED_HEIGHT, 1);

Remember to set z scale to 1.
Hope it will help.