I can add inky stories at runtime, but I haven't yet figured out how to remove them from the database afterward. I ask this question because I need to be able to reset the database or delete/remove a story when necessary (at runtime).
using Ink.Runtime;
using PixelCrushers.DialogueSystem;
using PixelCrushers.DialogueSystem.InkSupport;
public class DialogueSystemIntegrationSubclass : DialogueSystemInkIntegration
{
public void RemoveStory(string storyTitle)
{
var conversation = database.conversations.Find(x => x.Title == storyTitle);
if (conversation == null) return; // No such story.
Story story;
if (!storyDict.TryGetValue(conversation.id, out story)) return; // Story not in dict.
// Remove database from DS, remove story from database, then re-add database to DS:
DialogueManager.RemoveDatabase(database);
storyDict.Remove(conversation.id);
stories.Remove(story);
DialogueManager.AddDatabase(database);
}
}