- Home /
Question by
fox2402 · May 15, 2014 at 08:42 PM ·
networkingnetworknetwork.connect
Why is the Network.Connect does not work with "hostdata"
Hi there, trying to make a multiplayer with multiple PCs, i need to create and connect Pc to a server. I've managed to create through tutorial BUT, when i try to connect, it's not working. Here's some sample
I pull the hostdata with a while (to refresh in a given time):
while (Time.time < endTime){
hostdata = MasterServer.PollHostList();
yield return new WaitForEndOfFrame();
}
then i make pop-up button to connect:
if(hostdata!= null){
for(int i = 0; i< hostdata.Length; i ++){
if(GUI.Button(new Rect(Screen.width/2, 65f + (30f*i),300f,30f),hostdata[i].gameName)){
Network.Connect(hostdata[i]);
}
}
}
The problem is, when the button pops up (and i wait the end of the refresh time), clicking on it does absolutely nothing, sometimes in says in the console "received pong from xxx.xxx.xx.xx" (the ip-address) but nothing more, can you help me?
Comment