Code Generator for Bolt creates custom Units to manage BGDatabase data. All fields are supported (Unity asset fields are readonly, more info)

Supported custom units

With custom units you have full control over database data- you can select/add/update/delete rows. Custom units are generated for each table
# Unit Description
1 GetByIndex Retrieve field values from database by row's index. This is the best method to use inside for-each loop
2 GetById Retrieve field values from database by row's id.
3 GetByName Retrieve field values from database by row's name.
4 SetByIndex Set field values to database by row's index.
5 SetById Set field values to database by row's id.
6 SetByName Set field values to database by row's name.
7 Count Retrieve total number of rows
8 Create Create a new row
9 Delete Delete a row by its index

How to generate

  • Open BGDatabase window Window->BGDatabase
  • Select Settings tab, and chose Bolt
  • Fill in parameters and press Generate button
  • After units was generated, update Bolt units database, by pressing Tools->Bolt->Build Unit Options (or Full Extract if you use Bolt 2.0)
Once you chose your naming scheme "package" + "Classes name prefix" and used your generated actions in Bolt's graphs, please, do not change these settings, otherwise the references to these action will be lost. The same applies to tables/fields names.

Difference between getters and setters

  1. Getters are not included into control flow: you can not include them. Values are fetched when requested.
  2. On the other hand, setters are required to be included into control flow, otherwise they will not be executed

Bolt v.2 status

Bolt version 2 is currently under development. We are aiming to provide support for the latest alpha release. Current version is Bolt v.2.0.0a5, released 2019-07-15, which is supported by BGDatabase v.1.3.11

Additional downloads

Custom actions to support SaveLoad addon is available at Downloads page