- Home /
Rescalable button with text and image
Hello,
I want to create an IAP screen. In that screen I need to have a button that contains the currency count and a image of the currency. Ex:
They both need to be rescalable.
So, I create a horizontal layout group to parent the icon and the text. Control Child Size and Child force Expand are both active for height. I want the children to control they width The Icon preserves it's size. The text is a Text Mesh pro set to Auto Size. However it needs to have some sort of content size fitter. As i want it to fill the available space the height provides and give back it's with. If I activate the content size fitter I have a conflict with the layout group as documented.
Is there any alternative having the text fill it's box with flexible width and get the result below? I did not manage to generate any solution with Layout Element as described in the documentation.
Thanks, Mihai