Instantiate dialogue manager and play conversations at runtime

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
circusCharlie
Posts: 8
Joined: Thu Apr 29, 2021 1:48 pm

Instantiate dialogue manager and play conversations at runtime

Post 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
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Instantiate dialogue manager and play conversations at runtime

Post 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);
circusCharlie
Posts: 8
Joined: Thu Apr 29, 2021 1:48 pm

Re: Instantiate dialogue manager and play conversations at runtime

Post by circusCharlie »

That worked, thank you so much!!
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Instantiate dialogue manager and play conversations at runtime

Post by Tony Li »

Happy to help!
Post Reply