PixelCrushers.DialogueSystem.DatabaseManager Class Reference

Manages a master DialogueDatabase and its data in the global Lua environment. More...

Public Member Functions

 DatabaseManager (DialogueDatabase defaultDatabase=null)
 Initializes a new DatabaseManager.
 
void Add (DialogueDatabase database)
 Adds a database to the master database, and updates the Lua environment.
 
void Remove (DialogueDatabase database)
 Removes a database from the master database, and updates the Lua environment.
 
void Clear ()
 Removes all loaded databases from the master database and clears the Lua environment.
 
void Reset (DatabaseResetOptions databaseResetOptions=DatabaseResetOptions.RevertToDefault)
 Resets the master database using the specified DatabaseResetOptions.
 

Properties

DialogueDatabase defaultDatabase [get, set]
 The default database to use at startup or when resetting the database manager.
 
DialogueDatabase masterDatabase [get]
 The master database containing the assets of all loaded databases.
 
List< DialogueDatabaseloadedDatabases [get]
 The list of databases currently loaded into the masterDatabase.
 

Detailed Description

Manages a master DialogueDatabase and its data in the global Lua environment.

Constructor & Destructor Documentation

◆ DatabaseManager()

PixelCrushers.DialogueSystem.DatabaseManager.DatabaseManager ( DialogueDatabase  defaultDatabase = null)
inline

Initializes a new DatabaseManager.

Loading of the default database is delayed until the first time the database is accessed. If you want to manually load the database, you can reset it or add a database to it.

Parameters
defaultDatabase(Optional) The default database.

Member Function Documentation

◆ Add()

void PixelCrushers.DialogueSystem.DatabaseManager.Add ( DialogueDatabase  database)
inline

Adds a database to the master database, and updates the Lua environment.

Parameters
databaseThe database to add.

◆ Clear()

void PixelCrushers.DialogueSystem.DatabaseManager.Clear ( )
inline

Removes all loaded databases from the master database and clears the Lua environment.

◆ Remove()

void PixelCrushers.DialogueSystem.DatabaseManager.Remove ( DialogueDatabase  database)
inline

Removes a database from the master database, and updates the Lua environment.

Does not remove any assets that are also defined in other loaded databases.

Parameters
databaseThe database to remove.

◆ Reset()

void PixelCrushers.DialogueSystem.DatabaseManager.Reset ( DatabaseResetOptions  databaseResetOptions = DatabaseResetOptions::RevertToDefault)
inline

Resets the master database using the specified DatabaseResetOptions.

Parameters
databaseResetOptionsDatabase reset options.
  • DatabaseResetOptions.RevertToDefault: Unloads everything and reloads only the default database.
  • DatabaseResetOptions.KeepAllLoaded: Keeps everything loaded but resets their values.

Property Documentation

◆ defaultDatabase

DialogueDatabase PixelCrushers.DialogueSystem.DatabaseManager.defaultDatabase
getset

The default database to use at startup or when resetting the database manager.

◆ loadedDatabases

List<DialogueDatabase> PixelCrushers.DialogueSystem.DatabaseManager.loadedDatabases
get

The list of databases currently loaded into the masterDatabase.

◆ masterDatabase

DialogueDatabase PixelCrushers.DialogueSystem.DatabaseManager.masterDatabase
get

The master database containing the assets of all loaded databases.


The documentation for this class was generated from the following file: