Hello. Can I use independent script to get the current text of current dialogue? I need that to process text effect for each word.
Update: Thanks Tony, it works as you said. Sorry it takes long time for me to update this thread as solved.
[Solved] How to get current text of dialogue?
[Solved] How to get current text of dialogue?
Last edited by ichisan on Wed Jan 30, 2019 10:11 pm, edited 1 time in total.
Re: How to get current text of dialogue?
Hi,
Yes. You can add a script to the Dialogue Manager that has an OnConversationLine method. (See Script Messages.) The Dialogue System will call this method with every subtitle. Example:
You can also read DialogueManager.currentConversationState whenever a conversation is active -- that is, when DialogueManager.isConversationActive is true. This has all the information about the current conversation state.
Yes. You can add a script to the Dialogue Manager that has an OnConversationLine method. (See Script Messages.) The Dialogue System will call this method with every subtitle. Example:
Code: Select all
using PixelCrushers.DialogueSystem;
...
void OnConversationLine(Subtitle subtitle) {
Debug.Log("About to show the text: " + subtitle.formattedText.text);
}