WRPG UI Template Question

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mokiedokes
Posts: 9
Joined: Wed Feb 23, 2022 11:20 am

WRPG UI Template Question

Post by mokiedokes »

Hi Tony,

Using the WRPG UI Template, I was wanting to move the player Response Button to the bottom of the screen. I've repositioned other elements by dragging them around or adjusting the pos coordinates in the inspector tab's rect transform, but for the Response Button, the rect transform values are greyed out. I also cannot drag the button. I wasn't sure how to unlock it to reposition it.

When clicking on the Response Button, in the Rect Transform it says "Some values driven by VerticalLayoutGroup." But I wasn't sure how to manipulate the button independent of that group or how to access that group.

Thank you in advance.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: WRPG UI Template Question

Post by Tony Li »

Hi,

The WRPG Template Standard Dialogue UI prefab accumulates text in a scroll rect. Assuming you still want it to accumulate text, here are two ways you could handle it:

1. You could move the Response Menu Panel outside of the scroll rect:
wrpgMod1.png
wrpgMod1.png (21.78 KiB) Viewed 461 times

2. Or you could configure the Divider GameObject to expand vertically so the menu button(s) appear at the bottom. To do that:
  • Inspect the Response Menu Panel. Untick the Vertical Layout Group's Child Force Expand > Height checkbox.
  • Inspect Divider. Tick the Layout Element's Flexible Height checkbox.
  • Inspect Scroll Content. Add a Layout Element. Tick Min Height, and set it to 256.
wrpgMod2.png
wrpgMod2.png (16.77 KiB) Viewed 461 times

Neither approach is particularly specific to the Dialogue System. It's standard Unity UI layout, and fortunately there are lots of good tutorials on Unity UI. I recommend the raywenderlich.com Unity UI tutorial as a good starting point.
mokiedokes
Posts: 9
Joined: Wed Feb 23, 2022 11:20 am

Re: WRPG UI Template Question

Post by mokiedokes »

Thanks so much!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: WRPG UI Template Question

Post by Tony Li »

Glad to help! If you get stuck or have questions, let me know.
Post Reply