Change Subtitle Font In the Middle of the String
Change Subtitle Font In the Middle of the String
Is it possible to change the subtitle text with tags in the middle with code?
Maybe have to turn the whole thing into a TextMeshPro dealio?
Thanks for any advice
Maybe have to turn the whole thing into a TextMeshPro dealio?
Thanks for any advice
Re: Change Subtitle Font In the Middle of the String
Hi,
Yes, if you switch to TextMesh Pro, you can use the <font> tag to change fonts in the middle of a string.
Yes, if you switch to TextMesh Pro, you can use the <font> tag to change fonts in the middle of a string.
Re: Change Subtitle Font In the Middle of the String
Thank you for that input, I was able to get it implemented with those instructions.
A strange problem arrived after I started changing some of the fonts - it seems to stop scrolling with the next text at random. I noticed some other positioning problems that came in after swapping to Text Mesh Pro, so that might be related.
But I'm wondering if this instantly clicks as an "Oh, just check X" or not.
What might be causing the font change to make the subtitle stop scrolling automatically? It seems to stay one message behind. (I am using the TextMesh Pro Typewriter Effect)
A strange problem arrived after I started changing some of the fonts - it seems to stop scrolling with the next text at random. I noticed some other positioning problems that came in after swapping to Text Mesh Pro, so that might be related.
But I'm wondering if this instantly clicks as an "Oh, just check X" or not.
What might be causing the font change to make the subtitle stop scrolling automatically? It seems to stay one message behind. (I am using the TextMesh Pro Typewriter Effect)
Re: Change Subtitle Font In the Middle of the String
Hi,
Are there any errors or warnings in the Console window?
Nothing in the typewriter effect should cause it to stop or to show subtitles one line behind.
Would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com? You can zip up the Assets, Packages, and ProjectSettings folders. Please include the steps to follow to reproduce the issue.
Are there any errors or warnings in the Console window?
Nothing in the typewriter effect should cause it to stop or to show subtitles one line behind.
Would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com? You can zip up the Assets, Packages, and ProjectSettings folders. Please include the steps to follow to reproduce the issue.
Re: Change Subtitle Font In the Middle of the String
Avoiding the time it takes to package everything up and send it over (for now), I seem to have narrowed it down to ANY sort of formatting tag, either directly in the Dialogue Text field or added by script makes the TextMesh Pro Typewriter Effect stop working (lines just pop in) and after a couple lines it makes the messages pop in one message behind. (maybe it gets stuck and thinks I'm hitting skip?)
Any formatting I remove makes it work until the next formatting it hits.
Thoughts? Or do you just want to see it?
Any formatting I remove makes it work until the next formatting it hits.
Thoughts? Or do you just want to see it?
Re: Change Subtitle Font In the Middle of the String
Hi,
Are there any errors or warnings in the Console window?
I may need to see a reproduction project. As a test, I assigned a TextMesh Pro dialogue UI to DemoScene1 and set Private Hart's first line of dialogue to:
We need to intercept the <color=red><b>launch codes</b></color> before the enemy launches their weapon at our home world.
The typewriter effect worked correctly.
Are there any errors or warnings in the Console window?
I may need to see a reproduction project. As a test, I assigned a TextMesh Pro dialogue UI to DemoScene1 and set Private Hart's first line of dialogue to:
We need to intercept the <color=red><b>launch codes</b></color> before the enemy launches their weapon at our home world.
The typewriter effect worked correctly.
Re: Change Subtitle Font In the Middle of the String
No errors or warnings.
I'll set something up.
I'll set something up.
Re: Change Subtitle Font In the Middle of the String
Thanks! You can send a download link to tony (at) pixelcrushers.com.
Re: Change Subtitle Font In the Middle of the String
Okay, when I
1) Use the DemoScene1
2) Switch to the WRPG template.
3) Change the subtitle and typewriter to TextMeshPro
The autoscroll doesn't work with the Accumulate Text until I set up the OnCharacter() to set ScrollRect.verticalNormalizedPosition to 0 on the Scroll Rect.
I can use <color=red><b>launch codes</b></color> and it works just fine.
However, the moment I use:
<font=LiberationSans SDF>asdf</font> (which I think comes stock with TMP pro) or any other TMP Font Asset in the Dialogue Text, it displays the text in the font correctly, but after that line, the typewriter and autoscroll stops working.
Am I setting this up wrong?
1) Use the DemoScene1
2) Switch to the WRPG template.
3) Change the subtitle and typewriter to TextMeshPro
The autoscroll doesn't work with the Accumulate Text until I set up the OnCharacter() to set ScrollRect.verticalNormalizedPosition to 0 on the Scroll Rect.
I can use <color=red><b>launch codes</b></color> and it works just fine.
However, the moment I use:
<font=LiberationSans SDF>asdf</font> (which I think comes stock with TMP pro) or any other TMP Font Asset in the Dialogue Text, it displays the text in the font correctly, but after that line, the typewriter and autoscroll stops working.
Am I setting this up wrong?
Re: Change Subtitle Font In the Middle of the String
LiberationSans is the default font, so I imported TMP's Extras (Window > TextMesh Pro > Import TMP Examples and Extras) and used Bangers instead:
It works just fine. I'm testing in Unity 2020.1 with Dialogue System version 2.2.15.
If you're seeing something different, would you please zip up your project's Assets, Package, and ProjectSettings folders, and send them to tony (at) pixelcrushers.com?
Code: Select all
We need to <font="Bangers SDF">intercept</font> the <color=red><b>launch codes</b></color> before the enemy launches their weapon at our home world.
If you're seeing something different, would you please zip up your project's Assets, Package, and ProjectSettings folders, and send them to tony (at) pixelcrushers.com?