Quantcast
Channel: Answers by "IvovdMarel"
Viewing all articles
Browse latest Browse all 145

Answer by IvovdMarel

$
0
0
uGUI works with a 'parent controls child' attitude, not the other way around. Therefore, the thing that you want (child controls parent) is a bit of extra work. First, add a VerticalLayoutGroup or HorizontalLayoutGroup to your button, to place multiple items next to each other. Even if it's just one Text element, you should use this. Now, add a ContentSizeFitter component to your button. It will shrink the button down to the preferred size of it's child (if you select that from the dropdown). More info: http://docs.unity3d.com/Manual/HOWTO-UIFitContentSize.html

Viewing all articles
Browse latest Browse all 145

Trending Articles



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