- Home /
Unity sockets
Hi all, help please, what need to use sockets? dll, or it is built into Unity? Example... ServerSide
On GUI
if button.click SocketServer.Start(ip,port);
Update...
mes = socket.receive();
if (mes > 0)
{
if(mes[0] == 'Join')
{
Players++;
Player[players] = mes[1];
}
if(mes[0] == 'Model_0')
GameObject.Instantiate(prefab_0, mes[1], mes[2]);
if(mes[0] == 'pos')
GameObject.Find(mes[1]).transform.position = mes[2];
}
dll ...? photon linux not support Sorry for my bad english!
question - what need to use sockets? dll, or it is built into Unity?
Answer by stevethorne · Apr 24, 2014 at 08:29 PM
Using sockets is built into C#. This isn't related to Unity. Now whether or not Unity prevents you from using sockets, I'm unaware of. But, I believe it should all be very possible. Here's an introduction guide to socket programming in C#. If you're using JavaScript, I'm not sure how possible that will be, but I'm sure with a little googling you can figure it out.
Your answer
Follow this Question
Related Questions
How can I receive UDP messages or similar in WebGL? 1 Answer
Unhandled Exception: Mono.Linker.ResolutionException: Can not resolve reference 0 Answers
Does Unity Support TCP or only UDP? 0 Answers
Unity Network Device Discovery SSDP or DNS-SD 1 Answer
Why i can't receive 2 messages in a row from my server in Unity? 2 Answers