Unity Android +sqlite Path

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.