Page 1 of 1

Changing position of ScrollContent with TextLine

Posted: Fri Nov 20, 2020 5:58 am
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

Re: Changing position of ScrollContent with TextLine

Posted: Fri Nov 20, 2020 7:51 am
by Tony Li
Hi,

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

textlineAnchorBottom.png
textlineAnchorBottom.png (43.04 KiB) Viewed 101 times

Re: Changing position of ScrollContent with TextLine

Posted: Mon Nov 23, 2020 4:09 am
by martinou
That was so evident I couldn't see it !
Thanks a lot

Re: Changing position of ScrollContent with TextLine

Posted: Mon Nov 23, 2020 9:54 am
by Tony Li
Glad to help!