Adding a converation at runtime?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
ds2497
Posts: 49
Joined: Wed Jun 14, 2023 2:13 am

Adding a converation at runtime?

Post by ds2497 »

Hey there, I'm working on creating a bark conversation and adding it to the database at runtime. Here's my code:

Image

However, it's not functioning as expected, and the console is displaying an error: 'Dialogue System: Conversation 'Runtimed181b685-99df-44c4-9343-32b200d6f11a' not found in the database.'

Did I overlook something? Thanks!
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Adding a converation at runtime?

Post by Tony Li »

Hi,

Please use this code: How To: Add Database At Runtime

You'll want to create and add a new database containing your new conversation. The process of calling DialogueManager.AddDatabase() sets up the back-end data that the Dialogue System needs to run conversations and barks.

You can use the same actor IDs as in your initial database, in which case you don't need to add any actors to your new database.

Make sure to use conversation IDs that are different from your initial database (e.g., start at 10000 or something).
User avatar
ds2497
Posts: 49
Joined: Wed Jun 14, 2023 2:13 am

Re: Adding a converation at runtime?

Post by ds2497 »

Got it, thanks!
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Adding a converation at runtime?

Post by Tony Li »

Glad to help!
Post Reply