liisi.laasik wrote:Mostly the errors were because our NPC game object names did not match Articy actor names. I did not know the dialogue system has such a convention. Apparently something in the latest update is enforcing this. We are fixing them as we go.
It's not an absolute requirement. If you want to use a different GameObject name, just add an
Override Actor Name component and specify the actor name. You can read more details here:
How GameObject Are Associated With Conversations
liisi.laasik wrote:For one of the errors (copied below) I think we need your input tho. When calling DialogueManager:ConversationHasValidEntry with just the one conversation title argument, the transforms are set to null and I suspect later used to query Actor table. The conversation does have ActorID and ConversantID set, so I am not enitrely sure how this is happening.
Code: Select all
Dialogue System: Lua code 'return Actor[""].Display_Name' threw exception '[string "chunk"]:1: attempt to index field '' (a nil value)'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean)
PixelCrushers.DialogueSystem.DialogueLua:SafeGetLuaResult(String)
PixelCrushers.DialogueSystem.DialogueLua:GetTableField(String, String, String)
PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedTableField(String, String, String)
PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedActorField(String, String)
PixelCrushers.DialogueSystem.CharacterInfo:GetLocalizedDisplayNameInDatabase(String)
PixelCrushers.DialogueSystem.CharacterInfo:.ctor(Int32, String, Transform, CharacterType, Texture2D)
PixelCrushers.DialogueSystem.ConversationModel:GetCharacterInfo(Int32, Transform)
PixelCrushers.DialogueSystem.ConversationModel:SetParticipants(Conversation, Transform, Transform)
PixelCrushers.DialogueSystem.ConversationModel:.ctor(DialogueDatabase, String, Transform, Transform, Boolean, IsDialogueEntryValidDelegate, Int32, Boolean, Boolean)
PixelCrushers.DialogueSystem.DialogueSystemController:ConversationHasValidEntry(String, Transform, Transform)
PixelCrushers.DialogueSystem.DialogueManager:ConversationHasValidEntry(String)
Are you sure that the conversation's actor ID and conversant ID are set to valid actors? Are their Name fields set correctly? (You can check this in the Dialogue Editor window on the Actors tab.)
liisi.laasik wrote:Another issue is with async saves. PersistentDataManager.GetSaveDataAsync() takes a total of 18482 milliseconds while PersistentDataManager.GetSaveData() takes 433 for exactly the same data. They performed the same before the last update.
I'll take a look and reply back later today. Maybe the async version is processing too few dialogue entries per frame. The default is only 100. If you have 6000 dialogue fragments, this means it will take a minimum of 6000 / 100 = 60 frames. At 60 frames/sec, this be a minimum of 1000 milliseconds just in overhead of releasing control back to Unity.
Try increasing
PersistentDataManager.asyncDialogueEntryBatchSize to, say, 10000. You can set this on the Dialogue Manager GameObject in the Inspector.
liisi.laasik wrote:Do you have any instructions how to add Dialogue System source to the project instead of the dll? It would be nice to debug the code and give you more detailed input.
Instructions are
here. However, it's a big hassle that I'm going to address in Dialogue System 2.0. The problem is that Unity associates a GUID with each script. To Unity, the GUID assigned to the unpacked script file DialogueDatabase.cs is different from the GUID assigned to the compiled DialogueDatabase class in DialogueSystem.DLL. When you remove the DLL and import the source code, Unity will no longer recognize your dialogue database asset because the GUID will be different. The solution is to switch the Inspector to Debug mode and manually assign the DialogueDatabase.cs script to the asset. The same issue applies to all ScriptableObjects and MonoBehaviours in DialogueSystem.DLL, such as ConversationTrigger.
My later products (Love/Hate and Quest Machine) use a wrapper class that makes it effortless to switch between DLL and source code. But I haven't converted the Dialogue System to use wrapper classes yet.
Some studios import the source code into a separate project that they just use for debugging and exploring the code.