Page 1 of 1

AutoScroll with TMP

Posted: Wed May 27, 2020 8:43 am
by alwaro
Hello,

i can't get autoscroll to work with TextMeshPro.
I build the scene as far as possible as suggested in this thread, except the part with the size fitter as it doesn't seems necessary for the TMP effect writer?
I saw the TMP Typewriter Effect expects a ScrollbarEnabler of type UnityUIScrollbarEnabler. But i can't find this one in the component menu. It seems its a simple inheritance of UIScrollbarEnabler, so i changed the expected type to UIScrollbarEnabler. (see img in attachment, maybe this is already the problem?)
Anyway, the ScrollView itself works and the expected effect of the Typewriter is also visible, just the autoscroll function doesn't work. Can you please help me?

I'm using Unitv 2019.3.10f1 with Dialogue System 2.2.6.


Best regards
A.

Re: AutoScroll with TMP

Posted: Wed May 27, 2020 2:22 pm
by Tony Li
Hi,

The autoscroll option in TextMeshProTypewriterEffect was accidentally overlooked in a recent version. It's updated in the upcoming version 2.2.7. Here's a patch from 2.2.7:

DS_TMPTypewriterPatch_2020-05-27.unitypackage

You'll still need to add a UIScrollbarEnabler to your dialogue UI's main panel, assign its UI elements, and then assign it to the typewriter effect's Auto Scroll Settings.

Re: AutoScroll with TMP

Posted: Wed May 27, 2020 3:25 pm
by alwaro
Thanks for the fast help!
It works now better, but unfortunately still not as expected. The autoscroll functions jumps now immediately to the end of the text area, you can see it in the video at about 1:00. But maybe i'm using the wrong settings?

Re: AutoScroll with TMP

Posted: Wed May 27, 2020 3:46 pm
by Tony Li
Hi,

Your scroll content needs to have an adjustable size. This allows it to set the content height, which determines when it should scroll. For example, add a Content Size Fitter to it.

Here's an example scene:

DS_TMPAutoScrollExample_2020-05-27.unitypackage

Re: AutoScroll with TMP

Posted: Wed May 27, 2020 4:07 pm
by alwaro
Yes, it works now.
Thank you very much for your help!

Re: AutoScroll with TMP

Posted: Wed May 27, 2020 4:35 pm
by Tony Li
Glad to help! :-)