Hey everyone,
I’d like to use a lightweight SQLite database for my game to store some basic information (such as item tables, monster tables, attacks, etc.). However, I’m running into a bit of an issue.
I am using the information found here:
http://forum.unity3d.com/viewtopic.php?t=30249
to work with my SQLite database. I can successfully open up a connection to the database, work with it, etc. And while I can store the database in the Assets fold (and do a file:Assets/database.sqdb connection string) and it works fine while playing in the Editor, once I export the game it seems that the database is not exported, and it is not able to connect.
The only way I’ve been successfully able to get the database to be accessible after build is to put it in the base project directory, and then manually copy it over into the same directory as the executable after the build.
While this works fine for PC (since there is a _data folder anyway that I could figure out a way to make use of, I’m sure), it’s much less convenient for Mac, since everything needs to be stored inside the “App” if possible.
Is there a way to get the SQLite database to be included inside the App/_data folder, and accessible from the built version of the game?
On a side note, it seems based on my limited testing that the SQLite implementation included in Unity does not support the “Password=xxxx” standard for adding basic password-protection. Is there any way to add a password or other form of encryption to the database and still have it accessible to Unity? This is less important then getting it into the App if possible (since if people want to open up the game and modify it that is their choice), but it would be nice to not have the monster, item, attack, etc. tables so easily modified.
Thanks,
RD