Where can I get the current conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
dunathan
Posts: 7
Joined: Thu Apr 10, 2025 3:36 pm

Where can I get the current conversation

Post by dunathan »

As the title says, I need to fetch the conversation being played at a moment.
dunathan
Posts: 7
Joined: Thu Apr 10, 2025 3:36 pm

Re: Where can I get the current conversation

Post by dunathan »

I found what I needed under currentConversationState.subtitle.activeConversationRecord.ConversationTitle

But how to get the conversation itself? I need it for accessing dialogue entries list.
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Where can I get the current conversation

Post by Tony Li »

If you're only starting one conversation at a time, you can simplify it to:

Code: Select all

Conversation conversation = DialogueManager.masterDatabase.GetConversation(DialogueManager.lastConversationStarted);
If you allow multiple conversations to run simultaneously, you'll need to use DialogueManager.activeConversations to get the record for the conversation you want, and then use DialogueManager.masterDatabase.GetConversation().[/code]
dunathan
Posts: 7
Joined: Thu Apr 10, 2025 3:36 pm

Re: Where can I get the current conversation

Post by dunathan »

Thank you very much!
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Where can I get the current conversation

Post by Tony Li »

Happy to help!
Post Reply