AutoScroll with TMP

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
alwaro
Posts: 3
Joined: Wed May 27, 2020 8:03 am

AutoScroll with TMP

Post 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.
Attachments
unityUIScrollBar.png
unityUIScrollBar.png (18.68 KiB) Viewed 422 times
tmpEffectCode.png
tmpEffectCode.png (19.44 KiB) Viewed 422 times
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: AutoScroll with TMP

Post 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.
alwaro
Posts: 3
Joined: Wed May 27, 2020 8:03 am

Re: AutoScroll with TMP

Post 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?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: AutoScroll with TMP

Post 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
alwaro
Posts: 3
Joined: Wed May 27, 2020 8:03 am

Re: AutoScroll with TMP

Post by alwaro »

Yes, it works now.
Thank you very much for your help!
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: AutoScroll with TMP

Post by Tony Li »

Glad to help! :-)
Post Reply