Page 1 of 1

Anyone knows how to control this text pushing other text issue (see screens)

Posted: Tue Sep 10, 2024 12:08 pm
by dgames
Please check the screens bellow, it shows the NPC line with few words and then with a lot of words. when the words need two or more lines it pushes the name to the side and stretches that text. I have no idea why it does this and how to fix it. I really need some help here thanks :) the Ui is "Basic Standard Dialogue UI TMPro"
dialogue A.png
dialogue A.png (17.7 KiB) Viewed 35 times
dialogue B.png
dialogue B.png (48.44 KiB) Viewed 35 times

Re: Anyone knows how to control this text pushing other text issue (see screens)

Posted: Tue Sep 10, 2024 2:05 pm
by Tony Li
Hi,

You can add a Layout Element component to the subtitle panel's Portrait Name GameObject if one doesn't already exist. Tick Min Width and set a width such as 200 pixels:

portaitNameMinWidth.png
portaitNameMinWidth.png (126.3 KiB) Viewed 28 times

Then the portrait name will always be at least 200 pixels instead of getting squished.

Re: Anyone knows how to control this text pushing other text issue (see screens)

Posted: Wed Sep 11, 2024 5:52 am
by dgames
Works perfectly thanks :D !!

Re: Anyone knows how to control this text pushing other text issue (see screens)

Posted: Wed Sep 11, 2024 7:42 am
by Tony Li
Glad to help!