GameDB
1.6.0
GameDB Pro is a plugin that provides an easy to use and powerful game and meta data editor
|
GameDBEditor provides static methods for working with the GameDB Editor within the Unity Editor. Allowing things such as subscribing to events (load/save/promote) and programatically working with the editor. More...
Static Public Member Functions | |
static bool | LoadGameDB (string gameDBPath) |
Programatically load a GameDB in the editor. Useful if intergrating the GameDB Editor with other tools/editors. More... | |
static bool | SaveGameDB () |
Programatically save the currently loaded GameDB in the editor. More... | |
static void | AddRowToTable (string table, string key, Dictionary< string, object > data) |
Allows the adding of a row to a GameDB table via an editor script. The GameDB needs to already be loaded via LoadGameDB method. After adding rows the GameDB needs to be saved via SaveGameDB More... | |
static void | RegisterSavedGameDBCallback (Action< string > onSaved) |
Allows a callback to be registered when a GameDB has been saved in the editor. Useful for updating other editors or systems when data has changed. The Scope Name of the saved GameDB is returned via the callback. More... | |
static void | RegisterRevisionPromotionCallback (Action< string, string, int > onPromotion) |
Allows a callback to be registered for when a revision of the GameDB is promoted on the GameDB Server. This is useful to trigger events such as causing live clients to update when a GameDB has been promoted. The Scope Name, tag and revision number are returned via the callback of the promoted GameDB. More... | |
GameDBEditor provides static methods for working with the GameDB Editor within the Unity Editor. Allowing things such as subscribing to events (load/save/promote) and programatically working with the editor.
|
static |
Allows the adding of a row to a GameDB table via an editor script. The GameDB needs to already be loaded via LoadGameDB method. After adding rows the GameDB needs to be saved via SaveGameDB
table | The table to add the row to. |
key | The key of the row to add. |
data | The dictionary representing the fields and data to add. |
System.InvalidCastException | Thrown when data of an invalid type is added for a field. |
System.ArgumentOutOfRangeException | Thrown when a field in the data doesn't exist in the table. |
This example shows the code necessary to add a row to a table.
|
static |
Programatically load a GameDB in the editor. Useful if intergrating the GameDB Editor with other tools/editors.
gameDBPath | The path to the GameDB to load. |
true
/false
indicating success of the load operation.
|
static |
Allows a callback to be registered for when a revision of the GameDB is promoted on the GameDB Server. This is useful to trigger events such as causing live clients to update when a GameDB has been promoted. The Scope Name, tag and revision number are returned via the callback of the promoted GameDB.
onPromotion | The callback triggered on a promotion. |
|
static |
Allows a callback to be registered when a GameDB has been saved in the editor. Useful for updating other editors or systems when data has changed. The Scope Name of the saved GameDB is returned via the callback.
onSaved | The on saved. |
|
static |
Programatically save the currently loaded GameDB in the editor.
true
/false
indicating success of the save operation.