- Home /
Scroll A Text Once It Reaches The End Of The Viewport
I want to make a dialog system that automatically scrolls down when the text is larger than the background image.
I created a ScrollView, inside has a ViewPort, and I changed the content for a TextMeshPro. I deleted ScrollBars as I don't need it. I set only de VERTICAL movement in the Scroll Rect, and in the TextMeshPro object I added a Content Size Fitter and set it Vertical Fit as Preffered Size.
I pass a string to the TextMeshPro object, and thanks to a script I attached, the string is shown character by character, like someone's typing on a keyboard. So the complete string is not shown at once but being build every X seconds.
The behavior I want is that, when the string reaches the lower part of the image (viewport) start scrolling up automatically. But this doesn't happens. What it happens is when the first line is completed, it scrolls up and the second lines starts to be written.
Here's a video of the result I have. What am I missing?
Your answer

Follow this Question
Related Questions
[Solved] need help regarding autolayout in scrollrect 1 Answer
Scrollable zooming list 0 Answers
Scroll View: Is there a way to discriminate and accept only certain PointerEvents? 0 Answers
How can I programmatically tween a Scroll View to a desired position? 0 Answers
Scaling scroll view width to its content width or vice versa 0 Answers