简体   繁体   中英

TCP client for Unity

如何在Unity3d中编写TCP客户端,从服务器套接字不断读取数据并打印到控制台或更新某些文本框?

Creating a TCP client in unity3d is nearly the same as developing it in c#, you can use almost all the classes of .net (4.0 as of the latest unity 3.5), still before you use a class look for the support in mono from this page.

If the class is not supported in mono, just drag the respected dll corresponding to the class from the .net library. Also you have two methods to do it, write the whole logic using .net classes in unity. or make a dll of it and import it into unity and use that dll for processing TCP works. In terms of performance there is no difference, all depends on ur preference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM