Accumulate text causes jitter
Posted: Tue Aug 29, 2023 10:29 pm
Hi, I'm back with more problems.
The issue this time is to do with the ScrollToBottom() function I've grabbed from the SMS Dialogue UI to use in my Scrolling Dialogue UI. Since all my dialogue is just written to a single text box with the Accumulate Text setting, I've had to keep the Max Lines value relatively low for performance reasons. In doing so, when the dialogue becomes long enough that it starts deleting the oldest line, there's occasionally a very brief jitter (like a single frame) where text moves out of position, and the ScrollToBottom() function will only work some of the time. I imagine this is something to do with the fact that sometimes the removed lines of text are longer than the added lines, but I wouldn't have a clue how to solve this. I probably haven't done a great job explaining the issue, so I made this video showcasing it.
Don't mind the gibberish text. At the start, you'll see how the text scroll is supposed to work. When it reaches the point where all the text goes white (the max line limit is reached), the issue I've been talking about appears. Sometimes it scrolls, sometimes it'll just jump to the bottom, or jitter.
Any fixes or work arounds would be appreciated.
The issue this time is to do with the ScrollToBottom() function I've grabbed from the SMS Dialogue UI to use in my Scrolling Dialogue UI. Since all my dialogue is just written to a single text box with the Accumulate Text setting, I've had to keep the Max Lines value relatively low for performance reasons. In doing so, when the dialogue becomes long enough that it starts deleting the oldest line, there's occasionally a very brief jitter (like a single frame) where text moves out of position, and the ScrollToBottom() function will only work some of the time. I imagine this is something to do with the fact that sometimes the removed lines of text are longer than the added lines, but I wouldn't have a clue how to solve this. I probably haven't done a great job explaining the issue, so I made this video showcasing it.
Don't mind the gibberish text. At the start, you'll see how the text scroll is supposed to work. When it reaches the point where all the text goes white (the max line limit is reached), the issue I've been talking about appears. Sometimes it scrolls, sometimes it'll just jump to the bottom, or jitter.
Any fixes or work arounds would be appreciated.