Extra Databases

Component > Dialogue System > Miscellaneous > Extra Databases

Adds and removes extra databases to the runtime environment.

Properties

Property Function
Add Trigger The triggering event that causes this component to add (load) databases to the runtime environment.
Remove Trigger The triggering event that causes this component to remove (unload) databases from the runtime environment.
Databases The list of databases to add and remove.
Condition The condition that must be true for the add and remove triggers to fire.
Once (Not shown) As soon as one event (add or remove) has occurred, destroy this component.
One Per Frame (Not shown) Add/remove one database per frame instead of adding them all at the same time. Useful to avoid stutter when adding several databases.

Details

The Dialogue Manager only loads its Initial Database at start. If you use multiple databases, you must load them before use. You can use this component to automatically load and unload extra databases. To prevent stutter if loading a large number of big databases, it only adds one database per frame, so it may take several frames to add a list of databases.

Events

You can assign your own methods to the static events ExtraDatabases.addedDatabases and/or ExtraDatabases.removedDatabases to be notified when databases have been added or removed. Example:

ExtraDatabases.addedDatabases = OnAddedDatabases;
...
void OnAddedDatabases() {
// Variable "Time" is defined in the newly-added database. We use
// added Databases to wait until the database has been added before
// settings its value.
DialogueLua.SetVariable("Time", Time.time);
}

<< Components