Hello. I am new to unity. I have done some jobs in it, but I cannot say I am proficient in it. Is there any tutorial on how I can connect my project using a TCP connection to receive probabily Double data from another program or server?
It’s not a tutorial from Unity, but this is a tutorial on setting up a chat server within Unity using a TCP connection.
System.Net.Sockets are supported in unity, so you can use TcpClient and TcpListener.
Remember to use .NET 2.0 rather than .Net 2.0 Subset:
File->Build Settings->Player Settings->Other Settings->Api Compatibility Level->.Net 2.0
Here are some tutorials for more information:
https://www.youtube.com/watch?v=WBYRTlaUSskThanks a lot for these helpful comments. In the past days I was implementing it. There is still a problem. My Update function in Client does not the job. Although I have written the codes precisely the same, the Update function in Client does not do it to get “Server : Guest has connected.”
I do not know what is the problem. Is it because of the Broadcast function of the Update. It goes to Broadcast, and I expect to do the writer part, but nothing is going back. I use print function and I see that it is inside this function. I would be glad if you help me. I have attached the Server and Client scripts in a zip file for your consideration[113605-script.zip|113605]. Thanks.