Page 1 of 1

[HOWTO] How To: View Runtime Database

Posted: Sun Nov 19, 2023 11:27 am
by Tony Li
If you're importing or creating a database at runtime, you can still view it in the Dialogue Editor. If it's assigned to the Dialogue Manager's Initial Database, just double-click on the Dialogue Manager's Initial Database field. Otherwise, you can do it with a bit of scripting. Assuming you've added the imported/created database to the Dialogue Manager (e.g., using DialogueManager.AddDatabase()), add this script inside a folder named Editor:

ViewMasterDatabase.cs

Code: Select all

using UnityEditor;
using PixelCrushers.DialogueSystem;
using PixelCrushers.DialogueSystem.DialogueEditor;

public static class ViewMasterDatabase
{
    [MenuItem("Tools/View Master Database")]
    public static void ViewMasterDatabaseMenuItem()
    {
        DialogueEditorWindow.OpenDialogueEditorWindow();
        DialogueEditorWindow.instance.SelectObject(DialogueManager.masterDatabase);
    }
}
At runtime, select menu item Tools > View Master Database. This will view the Dialogue Manager's runtime master database, which contains all of the database content from the Dialogue Manager's Initial Database and any databases you've added using DialogueManager.AddDatabase() or Extra Databases components.