How to get current conversation - not last started

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jjpixelc
Posts: 44
Joined: Sun Mar 01, 2020 1:04 pm

How to get current conversation - not last started

Post by jjpixelc »

Hi

I was wondering how to get the name of the current conversation.
I am not talking about LastConversationStarted.
The problem is, that if I link to another conversation, then LastConversationStarted will still give me the original conversation from which I came - not the current one I just transfered to via the link.

Any way to get the name of the conversation I am currently in?
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to get current conversation - not last started

Post by Tony Li »

Hi,

Yes:

Code: Select all

int conversationID = DialogueManager.currentConversationState.subtitle.dialogueEntry.conversationID;
Conversation conversation = DialogueManager.masterDatabase.GetConversation(conversationID);
Debug.Log("Current conversation is: " + conversation.Title);
jjpixelc
Posts: 44
Joined: Sun Mar 01, 2020 1:04 pm

Re: How to get current conversation - not last started

Post by jjpixelc »

Beautiful - thanks as always for a quick and helpful reply!
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to get current conversation - not last started

Post by Tony Li »

Glad to help!
Post Reply