Hi, I've recently switched my data for my game over to a SQLite database. When I run the game in the editor it runs fine. Here's the code:
const SQLite = preload("res://addons/godot-sqlite/bin/gdsqlite.gdns")
var db
func _ready():
db = SQLite.new()
db.path = Constants.DATABASE_PATH # "res://data/data.db"
# db.verbose_mode = true
db.open_db()
However, when I now export the game and run the .exe file I get the following error:
ERROR: bool __cdecl godot::SQLite::open_db(void): GDSQLite Error: Can't open database: unable to open database file At: src\gdsqlite.cpp:123
I'm guessing that my .db file is not by default included in exporting? I've added ".db" to the export settings (see below) but it doesn't make a difference:
What do I need to do, or how can I check if the data.db file is included in the exe file? Alternaively, what's the preferred way to include SQLite database files?