unity3D连接mysql数据库:
1.下载安装mysql-connector-net-5.0.6,完成后将C:\Program Files (x86)\MySQL\MySQL Connector Net 5.0.6\Binaries\.NET 2.0下的MySql.Data.dll拷贝到unity工程的assets文件夹下
2.同时将unity安装路径E:\softset\unity4.6.3\Editor\Data\MonoBleedingEdge\lib\mono\2.0下的System.Data.dll拷贝到unity工程的assets文件夹下
3.在连接数据库的脚本中引入命名空间:using MySql.Data.MySqlClient;
可能会出现的问题:
1. Internal compiler error. See the console log for more information. output was:
Unhandled Exception: Mono.CSharp.InternalErrorException: Assets/Sctipts/Ui/Register.cs(8,14): Register ---> Mono.CSharp.InternalErrorException: Assets/Sctipts/Ui/Register.cs(14,39): Register.dbConnection ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Drawing, Version&