Page 1 of 1

Tips for making dialogue boxes adapt to size of text?

Posted: Sun Oct 22, 2023 8:37 am
by cristoo
Hi,
In my game the NPC's dialogue boxes adapt to the size of the NPC's text but the player's optional responses remain on fixed sized tiles. I'd like the player's response text to likewise be inside tiles that adapt to the size of the player's text sentences.

Are there any tips to do this? I have gone through a lot of options in the dialogue editor, I feel I'm missing an option.

Thanks for your time, Chris

Re: Tips for making dialogue boxes adapt to size of text?

Posted: Sun Oct 22, 2023 12:55 pm
by Tony Li
Hi,

That's not specific to the Dialogue System. Assuming you're using the Dialogue System's Standard Dialogue UI components, it's just plain old Unity UI. This may help: https://learn.unity.com/tutorial/ui-components

How you set it up will depend on your dialogue UI layout, but you can probably use a Content Size Fitter component on the response menu and set the Vertical dropdown to Preferred Size to size it vertically to fit the buttons.