Using Dialogue UI Prefabs to display long dialogue options

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jibjab910
Posts: 18
Joined: Fri Mar 02, 2018 7:46 pm

Using Dialogue UI Prefabs to display long dialogue options

Post by jibjab910 »

I'm having some trouble getting long dialogue options to display properly (within the UI) using the prefabs that have been created. For example, the following option: "I understand you have your orders, but I also have mine—to get these supplies to the refugees. I don't mean to work around you, but I am going to have to find men to accomplish the mission, even if it means talking to our chain of command." Would either scroll off of the screen or (if I put line breaks in at the appropriate points) overlap with other dialogue options. What do you suggest I do? Is there a prefab I'm missing that handles this well? Visual style is not a big deal--I just need the text to be displayed properly.
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using Dialogue UI Prefabs to display long dialogue options

Post by Tony Li »

How about starting with the Generic Unity UI Dialogue UI? It's the one that comes with the prefab located in Assets / Dialogue System / Prefabs. You can also find it separately in Assets / Dialogue System / Prefabs / Unity UI Prefabs / Generic. Each subtitle panel uses a Content Size Fitter that allows it to expand to fit the text.
jibjab910
Posts: 18
Joined: Fri Mar 02, 2018 7:46 pm

Re: Using Dialogue UI Prefabs to display long dialogue options

Post by jibjab910 »

This is excellent! How would I go about moving the NPC subtitle reminder (on the response selection screen) up to the top of the screen?
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using Dialogue UI Prefabs to display long dialogue options

Post by Tony Li »

Inspect Dialogue Manager > Canvas > Generic Unity UI Dialogue UI > Dialogue Panel > NPC Subtitle Reminder Panel. Set the Rect Transform component's Y position to -8. I believe its current value is something like -80. If you want it exactly flush with the top of the screen, set it to 0, in which case you may want to do the same thing to the NPC Subtitle Panel to make them look the same.
Post Reply