Unity 3d 使用通用SQLite

本文详细介绍了如何在Unity环境中通过Mono.Data.Sqlite库操作SQLite数据库,包括更新项目设置、替换库文件、修改代码引用、构建项目、在Xcode中添加数据库文件引用等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1) Down load that code and open it in Unity 3.3 (will upgrade the project)
2) Change the bundle identifier and set the SDK to iOS latest
3) Delete the file Mono.Data.SqliteClient in the Assets/Plugins folder
4) Drag into Assets/Plugins folder a copy of Mono.Data.Sqlite from the Unity.app . Right click on your Unity.app in the Unity folder (show package contents) select Contents/Frameworks/Mono/lib/mono/unity/Mono.Data.Sqlite
5) Edit SQLiteTest.cs
6) Change the using Mono.Data.SqliteClient referenence to using Mono.Data.Sqlite
7) Line 18 - change Application.dataPath to Application.dataPath.Replace("/Data","")
8) Do a build
9) Open the Xcode project and do a Command -Option-A to add a reference to the SQLiteTestDB.db file
10) Note you do *not* need to add libsqlite3.0.dylib to this project. That is only required if you have Objective-C or C++ code that accesses sqlite from a plugin.

11) Do a build and run and check the console output - you will see the actors names printed from the database

 

http://forum.unity3d.com/threads/54293-SQLite-database-permission-on-iPad/page2 

 

IOS中使用注意 Mono.Data.Sqlite版本问题

转载于:https://www.cnblogs.com/bandy/archive/2012/07/19/2599421.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值