Page 1 of 1

Instantiate dialogue manager and play conversations at runtime

Posted: Mon May 17, 2021 1:17 pm
by circusCharlie
Hi,

I am trying to instantiate the dialogue manager from resources and give it a database at runtime. When I check the Dialogue Manager inspector at runtime the initial database gets set properly, however, when I try to start the conversation from database it says "Conversation not found in database". This is because the old default database is set as the one being used. Kindly help me with this one.. thank you Image

Re: Instantiate dialogue manager and play conversations at runtime

Posted: Mon May 17, 2021 1:43 pm
by Tony Li
Hi,

You can remove the last two lines of your InitializeDialogueManager() method. Replace them with:

Code: Select all

DialogueManager.RemoveDatabase(DialogueManager.instance.initialDatabase);
DialogueManager.AddDatabase(scenarioDialogueDatabase);

Re: Instantiate dialogue manager and play conversations at runtime

Posted: Tue May 18, 2021 2:39 am
by circusCharlie
That worked, thank you so much!!

Re: Instantiate dialogue manager and play conversations at runtime

Posted: Tue May 18, 2021 8:23 am
by Tony Li
Happy to help!