Page 1 of 1

Conversation "title" not found in database.

Posted: Sat Sep 05, 2020 12:17 pm
by megadok
Conversation "Hank" not found in database but in my database there are a conversation named "Hank". I see the dialogue trigger and his database is the same that i use.

Code: Select all

Dialogue System: Conversation 'Hank' not found in database.
UnityEngine.Debug:LogWarning(Object)
PixelCrushers.DialogueSystem.ConversationModel:.ctor(DialogueDatabase, String, Transform, Transform, Boolean, IsDialogueEntryValidDelegate, Int32, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:138)
PixelCrushers.DialogueSystem.DialogueSystemController:ConversationHasValidEntry(String, Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:633)
PixelCrushers.DialogueSystem.DialogueManager:ConversationHasValidEntry(String, Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueManager.cs:343)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:DoConversationAction(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:860)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:Fire(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:635)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart(Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:617)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:603)
PixelCrushers.DialogueSystem.<StartAtEndOfFrame>d__98:MoveNext() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:598)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Re: Conversation "title" not found in database.

Posted: Sat Sep 05, 2020 12:29 pm
by Tony Li
Hi,

Make sure that same database is assigned to the Dialogue Manager GameObject's Initial Database field.

Re: Conversation "title" not found in database.

Posted: Sun Sep 06, 2020 1:23 pm
by megadok
Is the same database. :(

Re: Conversation "title" not found in database.

Posted: Sun Sep 06, 2020 3:43 pm
by Tony Li
Hi,

Double-check that you don't have two database assets with the same name.

Is it possible that there is a blank space in the conversation title, such as 'Hank '?

Or is it possible that something is unloading the database? (e.g., you have a script that calls DialogueManager.RemoveDatabase().)

Try re-selecting the conversation title in the Dialogue System Trigger's dropdown.

If that doesn't help, would you please send me a reproduction project?

Re: Conversation "title" not found in database.

Posted: Sun Oct 22, 2023 11:57 am
by nhahn
Google led me here, so I'll post my own findings for anyone else who ends up here. I was using "On Start" for the Dialogue System Ink Trigger, and swapping it to "On Use" stopped that from happening. Based on the order of items in the debug here, I assume that On Start for the ink trigger is getting called before the ink story is loaded. I could probably work around this by forcing a delay and using onEnable, but swapping to OnUse worked just as well for my current case.

(debug log order)
1. Dialogue System: Conversation '7D-Feedback' not found in database.
2. Dialogue System: Loading Ink story 7D-Feedback
3. Create conversation [10000] 7D-Feedback

Re: Conversation "title" not found in database.

Posted: Sun Oct 22, 2023 12:54 pm
by Tony Li
Hi Nathan,

Yes, that's correct. The Dialogue System Ink Integration component loads stories in Start(). If the Dialogue System Ink Trigger is set to OnStart, it will perform its actions at the end of the Start() frame, which means in most cases it should try to start the conversation after the Ink integration has loaded the stories. However, there's one exception: If you're on frame 0 of the game -- which happens if you're just entering play mode or if you have a Dialogue System Trigger set to OnStart in the first scene in build settings -- it will not wait until the end of the frame. Several Unity versions have a bug with execution order and the first frame. (WaitForEndOfFrame on frame 1 will skip to frame 2.) So, if the game is on frame 1, OnStart will run actions immediately instead of waiting for end of frame.

Eventually the Unity versions with this bug will age out. Until then, another alternative is to add a Save System component to your Dialogue System (or use the existing Save System component on some other GameObject if present), set its Framerames To Wait Before Apply Data to 1, and set the Dialogue System Ink Trigger's Trigger dropdown to OnSaveDataApplied. If you're loading a saved game, the trigger will perform its actions after the save data has been restored. If you're not loading a saved game, and instead you're just entering play mode or changing into the scene, it will wait an equivalent number of frames (i.e., 1) before performing its actions.