OnConversationLine passing empty subtitles

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ilgob
Posts: 3
Joined: Wed Feb 08, 2023 3:31 am

OnConversationLine passing empty subtitles

Post by ilgob »

I'm having an issue where OnConversationLine is passing subtitles with no text. Oddly enough, OnConversationLineEnd passes an empty subtitle as well, but fills it on the following frames. I thought maybe that could be due to the typewriter effect, but the empty subtitle being passed has no speaker information and such, either. I looked at the full object from the watcher and the text is nowhere, so I'm not checking the wrong field. Bark events are working just fine and conversation text is correctly displayed. Shifting desired operations into a LateUpdate has not worked. Any ideas on what might be the issue? Thanks!
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnConversationLine passing empty subtitles

Post by Tony Li »

Hi,

OnConversationLine will typically get an empty subtitle from the <START> node when a conversation starts. Is this what you're seeing?
ilgob
Posts: 3
Joined: Wed Feb 08, 2023 3:31 am

Re: OnConversationLine passing empty subtitles

Post by ilgob »

Hi. Thank you for response! Nope, that's not it. And for that matter, the first subtitle (START) does have a formattedText full of empty values, but still comes with dialogueEntry and entryTag filled out, whereas subsequent ones come up null on the latter two.
Spoiler
Image
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnConversationLine passing empty subtitles

Post by Tony Li »

Please add a Debug.Log line in your OnConversationLine() method. When the log appears in the Console for the empty subtitle, click on the log entry and press Ctrl+C to copy its details to the clipboard. Then paste it into a reply.
ilgob
Posts: 3
Joined: Wed Feb 08, 2023 3:31 am

Re: OnConversationLine passing empty subtitles

Post by ilgob »

I was adding listeners to DialogueSystemEvents. Implementing the method directly for messages instead has actually fixed the problem, thank you. The forum is flagging the log as spam, but in case it might be useful to anyone finding this problem in the future, for whatever reason conversation lines were not registering at all and barks (invisible empty ones?) were responsible for the event instead, as I've plugged the same function into both.
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnConversationLine passing empty subtitles

Post by Tony Li »

Hmm, maybe the GameObject with the DialogueSystemEvents component wasn't being used as the active conversation's conversation actor or conversation conversant. (Most conversation events/messages are only sent to the Dialogue Manager and the actor & conversant.) Anyway, I'm glad you got it working.

I'll also look into why the forum was flagging the logs as spam.
Post Reply