Skip to content

Instantly share code, notes, and snippets.

@ashblue
Created December 19, 2014 03:20
Show Gist options
  • Save ashblue/63b71024570b6e279741 to your computer and use it in GitHub Desktop.
Save ashblue/63b71024570b6e279741 to your computer and use it in GitHub Desktop.
Add multiple databases at load time to the master Dialogue System Database.
using UnityEngine;
using System.Collections.Generic;
namespace PixelCrushers.DialogueSystem.Adnc {
public class DialogueDbManager : MonoBehaviour {
[Tooltip("Allows you to add multiple databases to the current Dialogue System. @IMPORTANT Make sure to run the ID assigner to prevent overwriting.")]
[SerializeField] List<DialogueDatabase> db;
// Use this for initialization
void Awake () {
foreach (DialogueDatabase d in db) {
DialogueManager.AddDatabase(d);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment