Quantcast
Viewing all articles
Browse latest Browse all 16

GUIText Position under different resolution, different aspect ratio

I have been searched this for hours and seems there is no solution for this, so I try to ask here: I have a GUITexture and a GUIText, I wrote some script to auto rescale the GUITexture to fit the screen (in center) no matter the screen aspect ratio > 0 (e.g. 16:9) or < 0 (e.g. 3:5), but seems the code not work for GUIText if I use the correct aspect ratio AND resolution, it will look like (1) but if I tweet either the dimension of the game screen size or aspect ratio, the position will go all wrong. Should I use transform.position to relocate it, or use Pixel inset to do so? ![alt text][1] [1]: /storage/temp/23633-111.jpg

Viewing all articles
Browse latest Browse all 16

Trending Articles



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