![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
unity网络
BBoy_Lancos
不会PS的程序猿不是一个好BBoy
展开
-
unity串口通信
using System.Collections;using System.Collections.Generic;using UnityEngine;using System;using System.IO.Ports;public class PortManager : MonoBehaviour{ string getPortName; int baudRate = 9600; private Parity parity = Parity.None; private int da原创 2021-01-08 11:17:52 · 332 阅读 · 0 评论 -
TCP服务端
using System;using System.Collections;using System.Collections.Generic;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;using UnityEngine;public class SocketServer : MonoBehaviour{ int _port = 6000; strin原创 2020-12-29 11:03:09 · 201 阅读 · 0 评论 -
TCP客户端
using System;using System.Collections;using System.Collections.Generic;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;using UnityEngine;using UnityEngine.UI;public class TCPClient : MonoBehaviour{ int _por原创 2020-12-28 17:33:11 · 150 阅读 · 0 评论 -
UDP服务端
using System.Collections;using System.Collections.Generic;using UnityEngine;using System;using System.Net;using System.Net.Sockets;using UnityEngine.SceneManagement;using UnityEngine.UI;using System.Runtime.InteropServices;namespace ImmerUDP{原创 2020-12-28 17:29:23 · 241 阅读 · 0 评论 -
Config配置表
新建文件夹StreamingAssets在文件夹里新建一个名称为Config.txt的配置表Config配置表Config配置表代码具体调用可查看本作者网络文章代码using System.Collections;using System.Collections.Generic;using UnityEngine;using System.IO;using System;public class ConfigTest : MonoBehaviour{ private str原创 2020-12-28 17:28:26 · 1148 阅读 · 0 评论 -
UDP客户端
UDP客户端记得配合我Config配置表文章一块做using UnityEngine;using System.Collections;using System;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;public class UDP_Client : MonoBehaviour{ [Header("本地端口"), SerializeField]原创 2020-12-28 17:22:10 · 250 阅读 · 0 评论