How to use expandable widgets inside Unity?
Hi, I have a rive button with an icon and text that I want to use in my Unity app. The text needs to resize the button. This button is placed at the top-right corner of my Unity App, so it should expand from right → left, otherwise, it goes outside the screen.
In Rive Editor, I was able to make the button resize the way I needed. Now, inside Unity, whenever I change the text, it resizes the rive widget correctly, but I did not find a way to make the white container expand from right → left.
After applying a huge number to make it expand:
I thought about setting my RectTransform to resize together the rive widget, but I do not have access to the white element, only the Artboard width (which never changes).
Thinking more deeply about it, knowing the size of a rive element is totally needed when dealing with Vertical and Horizontal layout groups, so the layout group logic could be applied correctly.
Artboard properties:
Row properties:
Higher score value:
Both Row and Artboard elements will expand together with the text.
The artboard pivot (the Origin) goes correctly to the left side.