Unity controls the text to automatically expand the size according to the number of words, and expand the UI background

 Requirement: The position of the text content remains unchanged, and increases downward, and the background frame expands synchronously.

1. UGUI Jiugongge Stretching

Process the image resources of the background frame to avoid image stretching.

(10 messages) Unity UGUI Jiugongge Stretching_Unity Jiugongge Stretching_Wild District Hunting Dragon for Pet Blog-CSDN Blog

2. Add components to the background frame

 3. Text Add Component

4. Select the anchor point, if it is not modified, it will be in the center by default, then the text will expand up and down or left and right, which will not meet our requirements.

 

 

Guess you like

Origin blog.csdn.net/qq_37524903/article/details/131896907