Answer the question
In order to leave comments, you need to log in
How to expand the sprite to fit the text?
There is such a sprite
. It contains UI Text, I need to change the size of the sprite depending on the size of the text.
I tried to make a Sprite Sliced while broadcasting to the sprite component of the Content Size Fitter, but it didn't help, please help))))
Answer the question
In order to leave comments, you need to log in
A bit clumsy, but it works:
Insert text into a Layout with ContentSizeFitter, and hang a LayoutElement on the background with a flag to ignore the layout.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question