Hi,
When I'm using the Typewriter effect and the text component is vertically centered, the text correctly appears character by character, but for subtitles that would take multiple lines, the text jumps up when a new line is added. The result of this is that while the text is being shown and you are reading it, when the typewriter effect reaches the amount of characters that adds a line to the text box, the text shifts up while the player is reading.
Is it possible to make it so the dialog box contains the final number of lines? That would make it so the height of the text box doesn't increase during the typewriter effect.
I would like to keep my text vertically centered.
I can provide more info if my question isn't clear.
Thanks in advance!
Multiple lines Typewriter effect line jumping
Re: Multiple lines Typewriter effect line jumping
Hi,
What typewriter effect are you using? The UnityUITypewriterEffect and TextMeshProTypewriterEffect components will compute the final number of lines / size of the final text and keep it consistent while typing. Are you using some typewriter effect that isn't part of the Dialogue System?
What typewriter effect are you using? The UnityUITypewriterEffect and TextMeshProTypewriterEffect components will compute the final number of lines / size of the final text and keep it consistent while typing. Are you using some typewriter effect that isn't part of the Dialogue System?
Re: Multiple lines Typewriter effect line jumping
Hi Tony, thanks for your reply, I'm using the TextMeshProTypewriterEffect.
Re: Multiple lines Typewriter effect line jumping
Hi,
That looks like a customized version of the script.
However, I can confirm that the original TextMeshProTypewriterEffect script will exhibit this same behavior. Instead of using vertical center alignment, use top alignment, a content size fitter with Vertical set to Preferred, and center it in its parent.
Here's an example of what I mean:
DS_TestTMProVerticalCenter_2023-01-09.unitypackage
That looks like a customized version of the script.
However, I can confirm that the original TextMeshProTypewriterEffect script will exhibit this same behavior. Instead of using vertical center alignment, use top alignment, a content size fitter with Vertical set to Preferred, and center it in its parent.
Here's an example of what I mean:
DS_TestTMProVerticalCenter_2023-01-09.unitypackage
Re: Multiple lines Typewriter effect line jumping
Yeah, the modification to the script just plays sounds differently, but doesn't change how the typewriter effect actually controls the text though.
Thanks for the example, I'll cross check our settings with the package you sent!
Thanks for the example, I'll cross check our settings with the package you sent!
Re: Multiple lines Typewriter effect line jumping
Hi Tony,
I made a new project in our current Unity version (2021.3.8f1), imported Dialogue System and then imported your package, but the NPC Subtitle Text stays "SubtitleText". See the video:
[media]https://dl.dropboxusercontent.com/s/41d ... XsHrIR.mp4[/media]
EDIT: Ok, I went into Tools > Pixel Crushers > Dialogue System > Tools > Enable TMP and now it works. I'll now try to repro this in our project
I made a new project in our current Unity version (2021.3.8f1), imported Dialogue System and then imported your package, but the NPC Subtitle Text stays "SubtitleText". See the video:
[media]https://dl.dropboxusercontent.com/s/41d ... XsHrIR.mp4[/media]
EDIT: Ok, I went into Tools > Pixel Crushers > Dialogue System > Tools > Enable TMP and now it works. I'll now try to repro this in our project
Re: Multiple lines Typewriter effect line jumping
Reporting back to say that it looks like it worked. Thanks again!
Re: Multiple lines Typewriter effect line jumping
Glad to help!