Reply Options Below Scroll Buffer

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Reply Options Below Scroll Buffer

Post by boz »

Howdy,

If I click continue too fast, the reply options don't appear until I manually scroll down:
http://www.giphy.com/gifs/9RYOajBv2I9APuISzY

I've looked into ways to fix this a few times over the past couple of weeks, but I'm out of ideas.

Any thoughts?
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reply Options Below Scroll Buffer

Post by Tony Li »

Hi,

Can you back up your project and update to DS 2.2.17? It includes an updated UIScrollbarEnabler that works better when the scroll rect doesn't have a scrollbar. If that doesn't do it, let me know.
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: Reply Options Below Scroll Buffer

Post by boz »

That seems to have fixed it, thank you!
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: Reply Options Below Scroll Buffer

Post by boz »

It does appear that our old friend the whole "doesn't scroll all the way down when there are sprite icons" problem has re-emerged from it's slumber, however. Even if all icons are using quotation marks.

Here's an example buffer that caused the problem:

<size=30><font="UnicaOneRegularSDF"><color=#ee8695>NARRATION:</color></font></size>
It was a new day.

We continued on, immersed in the moment, lost in thought.

<font="UnicaOneRegularSDF"><uppercase>If <sprite name="Danger">incident takes place:
-18<sprite name="Floor"> Climb Height.</uppercase></font>

<color=#4A7A96><font="AlegreyaBoldSDF">Forage</font></color>
We looked for food. There's always some if you know where to look. After so much time we became very adept at this.

=================

I discovered a mysterious glowing box. As I approached, the lid of the box slowly raised.

<size=30><font="UnicaOneRegularSDF"><color=#ee8695>PRISONER:</color></font></size>
<font="ArsenalRegularSDF">[Close the box]</font>

<size=30><font="UnicaOneRegularSDF"><color=#ee8695>NARRATION:</color></font></size>
I moved to close the box, but it slammed shut, as if reading my intentions.

We continued on, immersed in the moment, lost in thought.

<font="UnicaOneRegularSDF"><uppercase>If <sprite name="Danger">incident takes place:
-20<sprite name="Floor"> Climb Height.</uppercase></font>

<color=#4A7A96><font="AlegreyaBoldSDF">Scrounge</font></color>
Seeing an opportunity, we scrounged the area for resources.

=================

We continued on, immersed in the moment, lost in thought.

<font="UnicaOneRegularSDF"><uppercase>If <sprite name="Danger">incident takes place:
5<sprite name="Distrust"> Antipathy.</uppercase></font>

<color=#4A7A96><font="AlegreyaBoldSDF">Climb</font></color>
We found a way up to the next floor, and after a short climb, and a few falling rocks, we climbed a floor higher.

=================

We continued on, immersed in the moment, lost in thought.

<font="UnicaOneRegularSDF"><uppercase>If <sprite name="Danger">incident takes place:
4<sprite name="Hunger"> Hunger.</uppercase></font>

<color=#4A7A96><font="AlegreyaBoldSDF">Scrounge</font></color>
Seeing an opportunity, we scrounged the area for resources.

=================

We continued on, immersed in the moment, lost in thought.

<font="UnicaOneRegularSDF"><uppercase>If <sprite name="Danger">incident takes place:
3<sprite name="Danger"> Desperation.</uppercase></font>

<color=#4A7A96><font="AlegreyaBoldSDF">Secret Route</font></color>
I gave a strange creature some food and it showed me where to find a way up.

=================

We continued on, immersed in the moment, lost in thought.

<font="UnicaOneRegularSDF"><uppercase>If <sprite name="Danger">incident takes place:
3<sprite name="Exhaustion"> Exhaustion.</uppercase></font>

<color=#4A7A96><font="AlegreyaBoldSDF">Climb</font></color>
We found a way up to the next floor, and after a short climb, and a few falling rocks, we climbed a floor higher.

=================

We continued on, immersed in the moment, lost in thought.

<font="UnicaOneRegularSDF"><uppercase>If <sprite name="Danger">incident takes place:
19<sprite name="Sand"> Sand Height.</uppercase></font>

<color=#4A7A96><font="AlegreyaBoldSDF">Scrounge</font></color>
Seeing an opportunity, we scrounged the area for resources.

=================

Sprained Ankle incoming incident.

<font="UnicaOneRegularSDF"><uppercase>If <sprite name="Danger">incident takes place:
Add Status Effect: Sprained Ankle.</uppercase></font>
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reply Options Below Scroll Buffer

Post by Tony Li »

Hi,

Did you ever hear back from Stephan on this TMPro issue? I think the problem is that TMPro is computing the height wrong. Would an acceptable workaround be to immediately jump to the bottom when the typing is finished? When TMPro is behaving, it should scroll properly. But if TMPro fails to compute the height correctly, at least jumping to the bottom will show the content.
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: Reply Options Below Scroll Buffer

Post by boz »

I'll accept a workaround at this point, heh. How do I do that?

They just said it was because of no quotation marks and that they'd fix that. But that's not what's happening here.

I took out the icons again too, and now the part that it was cutting off isn't even scroll-down-able. It's still there, and will show more as more stuff is added to the buffer, but you can scroll down to see it.

Something in the recent update might have exposed some old wounds?
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reply Options Below Scroll Buffer

Post by Tony Li »

Hi,

Try setting the TextMeshProTypewriterEffect's OnEnd() event to call the Scroll Rect's UIScrollbarEnabler component's CheckScrollbarWithResetValue (0). TextMesh Pro didn't present the error over here. Maybe it depends on a specific sprite size or something. But, regardless, calling UIScrollbarEnabler.CheckScrollbarWithResetValue definitely popped it to the bottom when I tested.
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: Reply Options Below Scroll Buffer

Post by boz »

Oh nice thank you, that's way better than what I was trying to do.

The effect is... not so good in my use case, but so long as it's "glitch free" for now, I'm happy with it and will circle back on it in the weeks to come.
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reply Options Below Scroll Buffer

Post by Tony Li »

Hopefully it can serve as a stopgap measure until Stephan fixes the issue in TMPro. I'm sorry I can't be more help there, but the issue appears to be in TMPro. I'd definitely follow up with him. If you're seeing the problem, then it's likely that many other Unity users are also affected, so fixing it will help a lot of people.
Post Reply