Page 2 of 2

Re: Previously evaluated, but not traversed groups

Posted: Tue Feb 18, 2020 2:46 pm
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.
}

Re: Previously evaluated, but not traversed groups

Posted: Tue Feb 18, 2020 7:09 pm
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!

Re: Previously evaluated, but not traversed groups

Posted: Tue Feb 18, 2020 7:33 pm
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.

Re: Previously evaluated, but not traversed groups

Posted: Wed Feb 19, 2020 2:32 pm
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!