Currently the typewriter effect breaks when using richtext tags other than <b><i><u> and <color> because the regex in Tools.StripRichTextCodes doesn't strip them (so the subtitle panel skips characters cause it thinks there's more visible characters then there are). There is a wealth of other rich text tags here http://digitalnativestudios.com/textmes ... /rich-text that the regex could be expanded to strip.
I dunno if there's enough people using non standard richtext tags to warrant the fix, I am dynamically setting the margin to create a crude "chat effect" in rich text, but I thought it's worth suggesting.
Suggestion: Let typewriter effect work with all richtext tags
Re: Suggestion: Let typewriter effect work with all richtext tags
Hi,
What rich text codes does the typewriter miss? If you're using the TextMeshProTypewriterEffect,, it should work with these codes, too:
<[Bb]>|</[Bb]>|<[Ii]>|</[Ii]>|<color=[#]?\w+>|<color=""\w+"">|</color>|
<align=\w+>|</align>|<font=[^>]+>|</font>|<indent=\w+\%>|<indent=\w+>|</indent>|
<line-height=\w+%>|<line-height=\w+>|</line-height>|<line-indent=\w+\%>|<line-ident=\w+>|</line-ident>|
<link=""[^""]+"">|</link>|<lowercase>|</lowercase>|<uppercase>|</uppercase>|"
<smallcaps>|</smallcaps>|<margin=.+>|</margin>|<mark=#\w+>|</mark>|
<nobr>|</nobr>|<size=\w+\%>|<size=\w+>|</size>|<sprite=.+>|<[Ss]>|</[Ss]>|<[Uu]>|</[Uu]>|
<sup>|</sup>|<sub>|</sub>
What rich text codes does the typewriter miss? If you're using the TextMeshProTypewriterEffect,, it should work with these codes, too:
<[Bb]>|</[Bb]>|<[Ii]>|</[Ii]>|<color=[#]?\w+>|<color=""\w+"">|</color>|
<align=\w+>|</align>|<font=[^>]+>|</font>|<indent=\w+\%>|<indent=\w+>|</indent>|
<line-height=\w+%>|<line-height=\w+>|</line-height>|<line-indent=\w+\%>|<line-ident=\w+>|</line-ident>|
<link=""[^""]+"">|</link>|<lowercase>|</lowercase>|<uppercase>|</uppercase>|"
<smallcaps>|</smallcaps>|<margin=.+>|</margin>|<mark=#\w+>|</mark>|
<nobr>|</nobr>|<size=\w+\%>|<size=\w+>|</size>|<sprite=.+>|<[Ss]>|</[Ss]>|<[Uu]>|</[Uu]>|
<sup>|</sup>|<sub>|</sub>
Re: Suggestion: Let typewriter effect work with all richtext tags
Huh, mine only blocks <b>, <i>, <u> and <color>, maybe I have an outdated version then.
Actually even the current Regex there still misses a few (and would miss it in my case)
Replace <margin=.+> with <margin-?\w+=.+> to include margin-left, margin-right, etc.
Actually even the current Regex there still misses a few (and would miss it in my case)
Replace <margin=.+> with <margin-?\w+=.+> to include margin-left, margin-right, etc.
Re: Suggestion: Let typewriter effect work with all richtext tags
Hi,
Please try this patch:
DS_TMProPatch_2022-04-05.unitypackage
It includes the latest TextMeshProTypewriterEffect and Tools script that uses an updated regex to support extra <margin-...> syntaxes.
Back up your project first to be safe. It should work with any relatively recent version of the Dialogue System, though.
Please try this patch:
DS_TMProPatch_2022-04-05.unitypackage
It includes the latest TextMeshProTypewriterEffect and Tools script that uses an updated regex to support extra <margin-...> syntaxes.
Back up your project first to be safe. It should work with any relatively recent version of the Dialogue System, though.
Re: Suggestion: Let typewriter effect work with all richtext tags
Glad to help! Thanks for letting me know about the missing regex for that tag.