Hi there, Is it possible to get SQLite working in the webplayer? I'm currently using the Indie version 2.6. I've already got it working in the editor and standalone export. But for the webplayer I get a DllNotFoundException. What I currently did was I copied my "System.Data.SQLite.dll" to the Assets/Plugins folder and to the root folder of the project. I had to copy it to the root or else the project wouldn't run. And also when I export my project as standalone I still have to copy the dll file to that folder. I read on the website that the Plugins folder only works for the Pro version. So my question would unity pro include dll files (like the sqlitedll) within the Plugins folder automaticly and would it also work in the Webplayer then? I hope someone could give me an answer on this. Because I saw lot of threads about sqlite but I couldn't really find an answer there. Greetz Jildert
May I ask the steps you did to get it working normally? I would like to use it but have no clue as to where to start. I can figure out the code, but just not sure about what dll's to get from where and where to put them.
A SQLite DB is just 1 file. There is no install or anything required on the players PC. The SQLite dll reads/writes to this file like it was a complex database (tables, views, etc). So if you want to have a table like structure that is local to the PC, SQLite is the way to go. If you are making an online game that needs to store things on a server then MySQL is the way to go since the MySQL will be on the server and not the clients PC. You can't expect players to install and configure a MySQL DB.
Well I downloaded SQLite driver from the sqlite site (attached it to this post) And created a Plugins folder in the assets folder of unity plus I also copied it to the root folder of the unity project folder so I didnt get any errors while playing the gaming in the unity editor. And in my C# project I added it as a reference and thats it. And after the export to standalone file I copied the dll to the root folder of the generated exe file.
The webplayer can not use any C# plugins nor can you use any filecommand on the webplayer which forms the base of opening local file databases. In addition the files in your projects don't exist as standalone files to open after the build at all. Or put shortly: SQLite will near granted not work. On the webplayer you can only access the web nothing thats local on your system, thats why PHP+MySQL / ASP + MSSQL or something comparable will be your way of going. As for the plugins folder: it works on any version I think. But unmanaged plugins will only work on Pro. But thats of no interest in this case as unmanaged plugins are not supported in the webplayer anyway, independent of your license (security constraint)
I downloaded and installed the SmartFoxServer 2X server. Then I downloaded and built the SFS2X multi-player FPS demo project. I built a web player version, and it has a PlugIn for the SFS2X client dll. My web player application works. I'm not sure if the SQLLite dll will work, but PlugIns do work with the Unity Pro web player build. I'm going to build a test game with SQLLite soon, so I'll post back my results when I get the time.