- Home /
MySQL.data and Unity
Hello everybody.
I developped a game and I'm using MySQL database system with it to save different datas. I have som DLL and MySQL.data file to manage my scripts and to request my database. All was working perfect in debug mode. But when I try to build the release version (not for the web but just for Windows computer) I have some errors.
I haven't Unity in front of me right now but it seems to be like this post .
There is an explanation of the problem but not the solution. How can I solve this problem ?
Thanks a lot !
Answer by UltimateBrent · May 22, 2011 at 09:36 PM
The gist I'm getting from that other post is that your DLL is dependent on stuff that's not included in the Unity runtime, so you'll need to find another MySQL plugin.
Overall, this is not how you want to do this anyway, because by the very nature of what you're trying to do, you have to send your MySQL credentials out with every copy of your client. I'll assume craftier people than myself can sniff that stuff out. You need to send your data to an intermediary script like PHP or something, and have that connect to your database for you. That way, even beyond security, you have the option to move your database to another server, add new databases, etc. as time progresses.
Spot on, unity is a client side ga$$anonymous$$g engine and I would consider most cases of data storage to be a server side action. Consider writing Writing a php app to read/write your database and use the WWW class to send receive data from unity to the back end.