Page 1 of 1

How to get the current dialogue text into the custom sequencer script?

Posted: Mon Nov 15, 2021 4:26 am
by arcanephoenix
Hello! Thank you for your help and your excellent keywords!

I have been working on the custom sequencer for my TTS project, and I was hoping that the custom sequencer C# code could get the current dialogue text displayed on the screen during the current dialogue entry when the sequence is activated. The only way I have previously found to access the dialogue text is to read the Dialogue Database file, but that produces all the dialogue text, not solely the current text, and I don't see a way to see the dialogue node (or id, or anything) that is currently active. I apologise if this is something very simple that I have been missing out, but I don't know how to get that text into a string that I can use in the custom sequencer script.

Thank you very much again!

Re: How to get the current dialogue text into the custom sequencer script?

Posted: Mon Nov 15, 2021 8:21 am
by Tony Li
Hi,

Check DialogueManager.currentConversationState.subtitle.formattedText.text.

DialogueManager.currentConversationState is the conversation's current state. Its subtitle property is the subtitle that the current state is currently showing.

Note: You can also add an OnConversationLine() method to the Dialogue Manager or participants.