Path = "Uri=file:" + application.streamingassetspath+ "/db/mydb.db";
Path = "Data source=" + application.streamingassetspath+ "/db/mydb.db";
Path = "Data source=" + application.persistentdatapath+ "/db/mydb.db";
Dbcon = new Mono.Data.Sqlite.SqliteConnection (Path);
Keyword: uniy3d android read-write database SQLite file io android streamassets
First Look: File structure
1. Need for third-party support in Plugins->android->assets
: http://vdisk.weibo.com/s/abGz3
2. Modification: Used sub, NET 2.0 for. net2.0 Place: playersetting
3. Move the flat belt, Streamasset does not support read and write. Put sandbox: Access sandbox path: Application.persistentdatapath
Your question:
A. Streamasset cannot support writing
B. The copy file method is incorrect. There is a problem with the database file being copied. (This is my problem, because the mobile platform debugging has not been done, so trouble and experience, to carry,)
4. Copy the existing file to the sandbox:
Intent: By putting the file into the Streamassets, the published database is placed in the package, as a local database. (You can't always build a database in your code)
Original address: http://tieba.baidu.com/p/2686574400
Unity Android +sqlite Path