链接数据库,可以分为以下几个流程: 链接MySQL(数据库地址.端口.用户名.密码) 选择数据库 执行sql语句 关闭数据库 转换为代码如下: using System; using MySql.Data; using MySql.Data.MySqlClient; using System.Data; using System.Text.RegularExpressions; using System.Runtime.Serialization; using System.Runtime.Se
http://www.66acg.com/?post=137 补充 unity编辑器端获取打包命令行自定义参数,这个可以获取到所有打包时的参数 string[] runArgs = System.Environment.GetCommandLineArgs(); 一.在Assets\Editor目录下放个脚本 using UnityEngine; using UnityEditor; using System; using System.IO; using System.Collections.
简介: 网络编程是个很有意思的事情,偶然翻出来很久之前刚开始看Socket的时候写的一个实例,贴出来吧 Unity中实现简单的Socket连接,c#中提供了丰富的API,直接上代码. 服务端代码: [csharp] view plain copyThread connectThread;//当前服务端监听子线程 public string address;//当前地址 public int port;//当前本地端口 TcpClient romoteClient;//远程客户端 // Use t