Previously evaluated, but not traversed groups

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Previously evaluated, but not traversed groups

Post by Tony Li »

Whenever the Dialogue System sets the text on Subtitle Text or Portrait Name, it sends the message OnTextChange(UITextField). As a less hacky alternative, you could add a script to the Subtitle Text that has an OnTextChange method:

Code: Select all

using PixelCrushers;
...
void OnTextChange(UITextField subtitleText)
{
    //... Text changed in subtitleText.textMeshProUGUI.
    //... In this method, you can tell Text Animator to update.
}
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Previously evaluated, but not traversed groups

Post by VoodooDetective »

Thanks for the suggestion! Maybe I can wire that up myself, assuming I can stop TextAnimator from monitoring changes to the TMP.text field directly. Thanks!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Previously evaluated, but not traversed groups

Post by Tony Li »

Maybe Federico can add a method to Text Animator to tell it to manually refresh. Then you could call that in OnTextChange.
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Previously evaluated, but not traversed groups

Post by VoodooDetective »

I gave it a shot, and it seemed to work at first, but then later messages in the conversation wouldn't show up. This was the code:

Code: Select all

void OnTextChange(UITextField subtitleText) { textAnimatorPlayer.ShowText(subtitleText.text); }
I'll stick with the hack for now, and maybe Federico will find a better solution over time. Thanks again for the help/suggestions!
Post Reply