Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

[Script] Simple script that automatically adjust anchor to GUI object size (Rect Transform)

$
0
0
I have been playing around with the new GUI in 4.6. I have found out that there is no automation that allows the user to surround a GUI object (panel, button, etc.) with anchors on all sides. This would effectively make GUI object scales and stay at the same position relatively to the screen size. Therefore, I wrote a simple script that help me do that, hope this help,

Note: This only applies to GUI object with parents.. do not apply it on the root canvas...

[Script] Simple script that automatically adjust anchor to GUI object size (Rect Transform)

Viewing all articles
Browse latest Browse all 23263

Trending Articles



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