What we'd like to do is to add a button "Update Database" which would load the XML resource and replace the currently running database. I'm currently stuck in even more stupid place:
Code: Select all
using PixelCrushers.DialogueSystem.Articy;
Code: Select all
using PixelCrushers.DialogueSystem.Articy;
Call DialogueManager.RemoveDatabase() to remove the old database. Then call DialogueManager.AddDatabase() to add the new one. Note that this will reset any data in the Lua environment that's associated with the old database.irve wrote:When I get the new database from the converter; how can I swap out the existing one?
Should I iterate over controllers/triggers to swap out the reference or is it somewhat more straightforward?
Code: Select all
DialogueManager.RemoveDatabase(DialogueManager.Instance.initialDatabase);
var database = ArticyConverter.ConvertXmlToDatabase(myXmlData);
DialogueManager.AddDatabase(database);
Code: Select all
Dialogue System: Lua(Conversation[92] = { Status = "", Title = "Conventions / Test without semantics", Pictures = "[]", Description = "Testing dialogue devoid of emotions", Actor = 47, Conversant = 50, Articy_Id = "0x010000110000030B", Dialog = {}})
Code: Select all
Dialogue System: Lua(Conversation[92] = { Status = "", Title = "Conventions/Conventions / Test without semantics", Articy_Id = "0x010000110000030B", Description = "Testing dialogue devoid of emotions", Actor = 59, Conversant = 62, Dialog = {}})