Changing position of ScrollContent with TextLine

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
martinou
Posts: 2
Joined: Fri Nov 20, 2020 5:47 am

Changing position of ScrollContent with TextLine

Post by martinou »

Hi,
I'm new to Dialogue System and I want to use the TextLine asset to create a chat-like dialog system.

However I want the scrollContent to begin at the bottom of the scrollRect instead from the top, because I need the last dialog to always be at the same position on the last line.

I tried to play with the rectTransform position of the scrollContent and changed anchors to bottom instead of top, but after that when I try to change the posY value, it returns automatically to the initial value and the initial Rect stays on top.
I also tried to change the vertical layout group child alignment with no success.

Any help will be appreciated.
Thanks
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Changing position of ScrollContent with TextLine

Post by Tony Li »

Hi,

Anchor the Scroll Content to the bottom of the Scroll Rect:

textlineAnchorBottom.png
textlineAnchorBottom.png (43.04 KiB) Viewed 97 times
martinou
Posts: 2
Joined: Fri Nov 20, 2020 5:47 am

Re: Changing position of ScrollContent with TextLine

Post by martinou »

That was so evident I couldn't see it !
Thanks a lot
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Changing position of ScrollContent with TextLine

Post by Tony Li »

Glad to help!
Post Reply