Adjusting the height of UI Text according to content.

I am new to the unity’s latest UI. What I know about UI Text Element is, we can wrap the text with in the horizontal bounds, but if it comes to next line, either it overflows or it truncates. If it fits in the height, font size decreases. What I want is to adjust the height of the text area according to the content it contains, without affecting the font size inside.

How do I achieve it?

Use the ContentSizeFitter component on the text.

1 Like