GUIText not affected by OnGUI?

Hey everyone, I’m currently trying to resize my GUIText dynamically for different aspect ratios using the following code in OnGUI().

float width = Screen.width / 1920.0f;
float height = Screen.height / 1080.0f;
GUI.matrix = Matrix4x4.TRS (new Vector3(0, 0, 0), Quaternion.identity, new Vector3 (width, height, 1)); 

However this is not affecting the text at all and it stays the same size. Is there anything I’m doing wrong or what I can do to make the GUIText be affected by this matrix change?

GUIText and GUITexture are older components, and aren’t affected by GUI.matrix - this matrix is part of the newer GUI system, where you should render text in OnGUI with GUI.Label or other GUI functions. There’s no way to rotate GUIText or GUITexture, and scaling GUIText accordingly to the screen size is a nightmare - you must change the GUIText.fontSize, anchors etc. If you need to scale the text, switch to the GUI system.