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?

4423291--403495--YKmD4.gif

1 Like

Sorry if this is necroposting or something, but did you manage to make it?