Something is unclear to me concerning the use of multiple databases and scripting. I am using a master database containing some variables that should be shared between scenes, and all other content is stored in scene-specific databases.
I've set up my scene in such a way that I have a Dialogue System Controller (DSC) an Extra Databases (ED) component. My original idea was to set the master database as the initial database of the DSC (it's a prefab used in each scene), and set the scene-specific database in the ED component.
However, if I do it this way, I cannot access any of my conversations from a c# script, by using DialogueManager.StartConversation. It seems only the conversations loaded in the database from the DSC component are accessible from the DialogueManager class through scripting.
So I changed things around, this time setting the scene-specific DB in the DSC component and the master DB in the ED component. Now I can start my conversations with DialogueManager.StartConversation, but I run into a new problem when trying to use DialogueLua.Get/SetVariable. These calls work and seem to set and retrieve the value for the variables, but when I use these variables in conditions in a conversation, it seems like their value is not stored. I suspect this has something to do with how the "Sync from DB" option works, which I am using to gain access to the master DB's variables in my scene-specific DBs.
So, my general question is: how does scripting work together with the use of multiple databases? And two specific ones:
- Is it possible to select which database is used by DialogueManager.StartConversation?
- When using DialogueLua.Set/GetVariable with variables that are synced from a different DB, do the ones in the source DB get used or does this use a copy of the variables in the currently active DB?