When playing my game from the editor, I have no issues with accessing the database, however when I build the game and run it, I cannot access the database. My database is inside the path Assets/Plugins. I should have all the required DLLs in that folder as well. I have checked the output_log.txt file for my game and got the following messages:
SqliteException: Unable to open the database file at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x00000] in <filename unknown>:0 at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] in <filename unknown>:0
This has led me to believe that my database files are in the wrong directory, or I am accessing them incorrectly. Here is the code for how I access the database:
var RoomDB = new SqliteConnection("Data Source=Assets\\Plugins\\Rooms Table.db;Version=3;"); RoomDB.Open();
If the issue is with the path of the database, where should I move them to inside the final build folder?