Quantcast
Channel: Questions in topic: "camera ratio"
Viewing all articles
Browse latest Browse all 16

GUIText not affected by OnGUI?

$
0
0
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?

Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>