Page 1 of 1

Text doesn't clear after conversation

Posted: Thu Mar 02, 2023 1:59 pm
by squirmonkey
Hello!

I've made an adjustment to my Dialogue UI that adds a second text box which some of the subtitle panels use to display their text. I'm finding though that this new text box doesn't clear between conversations, which means the last line of the previous conversation is visible while it is fading in. All of the subtitle panels that use the new box are configured to "Clear on Close", but it doesn't seem to be working.

Any advice you can provide would be greatly appreciated!

Re: Text doesn't clear after conversation

Posted: Thu Mar 02, 2023 6:23 pm
by Tony Li
Is that new text assigned to a StandardUISubtitlePanel component's Subtitle Text field? If so, then when that subtitle panel closes it should clear the text (if Clear Text On Close is ticked). Otherwise, you could configure the main panel's OnClose() UnityEvent to set the new text's Text property to a blank string to clear it.

Re: Text doesn't clear after conversation

Posted: Fri Mar 03, 2023 12:04 am
by squirmonkey
Yeah, it's set up that way as far as I can tell. It's just not working.

I guess I'll have to do the workaround. What is the difference between OnClose and OnClosed?

Re: Text doesn't clear after conversation

Posted: Fri Mar 03, 2023 7:48 am
by Tony Li
OnClose() happens when the panel starts to close. OnClosed() happens when the close animation has finished.

Please feel free to send a reproduction project to tony (at) pixelcrushers.com. If the text is assigned to a Subtitle Text field and Clear Text On Close is ticked, then it should be set to a blank string on close. If it's not assigned to Subtitle Text but you've used OnClose() or OnClosed(), it should also do whatever you've set those UnityEvents to.