Tips for making dialogue boxes adapt to size of text?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
cristoo
Posts: 6
Joined: Sun May 29, 2022 5:30 am

Tips for making dialogue boxes adapt to size of text?

Post 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
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
Post Reply