copy sqlite database from assets folder to android persistentpath in unity3d -


i have squlite database in assets folder name mydatabse.s3db , want copy android application.persistentdatapath. have used following code

string filepath = application.persistentdatapath + "/mydatabase.s3db"; if (!file.exists (filepath)) { www loaddb = new www("jar:file://" + application.datapath + "!/assets/mydatabase.s3db"); debug.log("yield done"); while(!loaddb.isdone) {} file.writeallbytes(filepath, loaddb.bytes); debug.log("copy done"); } 

the database created in application.persistentdatapath path empty.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -