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

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
arcanephoenix
Posts: 2
Joined: Fri Oct 08, 2021 7:37 am

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

Post 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!
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
Post Reply