|
Hey guys, I have been trying to setup a sqlite server for my game, however I am running into problems with the Using statements (Using System.Data) in particular....Ive read around on old posts and they all say it works in JS but not C# so i was wondering if there is a way to get it to work in C# Thanks in advanced!
(comments are locked)
|
|
Do you use the official version from this page? Also you don't need / should not use the System.data namespace. You just need I haven't used it yet, but maybe i give it a try. I only used mysql in the past. SQLite only in C++ ;). But in Unity i wasn't in need of a database (well we have one but on the webserver...). Yes i am using the offical version, and I am trying to use the System.Data.SQLite namespace, which gives the same result... Asfar as the working in JS but not C# take a look at this post http://forum.unity3d.com/threads/28500-SQLite-Class-Easier-Database-Stuff Thanks for your time in trying to help me aswell, hopefully we can reach a conclusion.
May 25 '11 at 04:45 AM
UnityDev0008
Did you put System.Data.Sqlite.dll into your Assets folder?
May 25 '11 at 06:14 AM
yoyo
I can't see any post that it doesn't work in C#. I just see a lot post that complains that it doesn't work with JS. Anyway this thread is not about the official SQLite library. Do you have the dll in your assets like yoyo said? Don't put the dll into the plugins folder. This folder is for native code dlls. Just somewhere in your assets, like a script ;)
May 25 '11 at 02:25 PM
Bunny83
Hey guys, No i didnt have the System.Data.Sqlite.dll file in my assets folder >< this did open clear that problem but now when trying to open my database i am getting error...any ideas?
May 26 '11 at 06:06 AM
UnityDev0008
(comments are locked)
|
|
You mention the location, Mono.Data.Sqlite.dll On iOS you would use sqllite3.dylib or some .dylib This is a good question not just for SQlite implementation, but on the use of Dynamic Link Libraries in general. Does anyone have a comprehensive list for all SQlite implementations for Mono.Data.Sqlite on these Unity3D platforms?
(comments are locked)
|
|
that is the best solution for you http://u3d.as/content/orange-tree/sqlite-kit/3ka That is 100% managed code, full SQLite3 support, all platforms. No native dependencies. In my eyes $100 is a bit expensive for a ported public domain software. Here's a free 100% managed port of sqlite 3.7.7.1. However it probably doesn't work in the webplayer since you can't access any files on the clients PC.
Sep 10 '12 at 09:52 PM
Bunny83
Yes it's based on free version, but we put a big afford to manage it works on unity (original free sqlite-c-sharp doesn't work) at the first place and second we modify that library to support memory stream to make it possible to run on webplayer platform. So it's good time saving dial for you.
Sep 11 '12 at 04:21 AM
Oksana Iashchuk
(comments are locked)
|
|
A really dedicated solution as local data storage for your games is Siaqodb see more info here: http://siaqodb.com/?p=482
Just put a siaqodb.dll in your scripts folder and GO!, no extra configuration, no nightmares with unmanaged references
(comments are locked)
|
|
Using Sqlite within Unity really isn't that hard, while they can help, I really don't think third-party solutions are required. I'm pretty sure that the System.Data.Sqlite library works with C#, though my own implementation use Mono.Data.Sqlite, I can't remember if I had run into problem or if that's just a coincidence. In any case, Mono.Data.Sqlite.dll can be found in the Unity folder: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0. That'll make a messy post and uncleaned code, but here's an small wrapper I extracted from a project I have somewhere. Do not use it as actual implementation, its just for you to get an idea of how it works, I've removed all goodies and safe-checks for clarity. Finally, I did modify it a little, but I'm confident it works, I've used SQLite in that manner in several standalone games. By the way, SQLite doesn't require a server of any kind, it really boils down to database file. As for the webplayer, one could hack around the problem by using PHP's native support for SQLite and MySQL, passing the data with WWW or even ExternalCall.
Sep 11 '12 at 05:05 AM
by0log1c
(comments are locked)
|
