Scaling GUI When Screen Width is Adjusted

Hi, all! I have looked at the answers to this question many times, but none ever seem to work!

I have made I game. I have designed the GUI to work with 1080 x 1024 resolution screens. My GUI will get squished together or will leave the screen in any other resolution. Is there a way to scale my GUI so that the smaller the screen is, the smaller the GUI (& text inside it) is? The other examples I have seen just position the GUI. :(

Also, I have GUITexture backgrounds. Is there any way for me to make it so that my background image is scaled/stretched to fit the screen?

I really need help here. Any help would be greatly appreciated. Thanks! - YA

Yes, you can use GUI.matrix to scale your Gui. However, note that your gui will probably look stretched with other aspect ratios unless you design your gui for each ratio.

Scale x by (Screen.width / 1080) and y by (Screen.height / 1024). Use Matrix4x4.Scale to create the matrix.

I haven't tested it myself but this should work.

Vector3 scale = new Vector3((float)Screen.width / 1080.0f, 
                            (float)Screen.height / 1024.0f, 
                            1.0f);
GUI.matrix = Matrix4x4.Scale(scale);