I spoke with Federico a bit more, and it looks like the problem is a little more complicated than first we understood.
The workaround ended up being this change to TextAnimator.cs:
Code: Select all
private void _SyncText(string text, ShowTextMode showTextMode)
{
BuildTagsDatabase();
//Prevents to calculate everything for an empty text
if (text.Length <= 0)
{
hasText = false;
text = string.Empty;
_tmproText.text = string.Empty;
tmproText.ClearMesh();
return;
}
if (triggerAnimPlayerOnChange) { text += " "; } // <----------- CUSTOM CHANGE
Basically, Text Mesh Pro doesn't send a TextChanged event in very specific circumstances, and since that's how TextAnimator tries to detect changes, this was the only way around for now. Sounds like Federico is going to try to ask Stephan for help with the event stuff. The only other alternative is to somehow have DSU call ShowText() directly, but I'm not sure how that would work unless there were some interface for different text components.
Anyways, I guess I'm happy since there's a workaround. Without it, you can't really use TextAnimator with DSU.