Page 1 of 1

How to get current conversation - not last started

Posted: Sun Feb 28, 2021 4:31 pm
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?

Re: How to get current conversation - not last started

Posted: Sun Feb 28, 2021 5:31 pm
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);

Re: How to get current conversation - not last started

Posted: Mon Mar 01, 2021 3:35 am
by jjpixelc
Beautiful - thanks as always for a quick and helpful reply!

Re: How to get current conversation - not last started

Posted: Mon Mar 01, 2021 8:48 am
by Tony Li
Glad to help!