[HOWTO] How To: View Runtime Database

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] How To: View Runtime Database

Post 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.
Post Reply