c# - Masterserver.UnregisterHost? -
I am trying to exclude the old code from Masterserver.PollHostData () When a game is over, I run the following scripts that the client still has PollHostData () .
Although the client restarts the game, then I will not get the I'm saying some old posts HostData of the previous game It has tried to clearing the host data before voting for it, but without success. The player who created the server is not getting the game, which is strange because I clear my hostData array before re-assigning it. UnregisterHost is not working, if so, what are my options?
First of all, why do not I understand
master server.nagarsterhost (); // UngerHost () tried even before. Here it is because the master server has server information, not the client information.
if (Network.isClient) {if (Network.connections.Length == 1) {debug.log ("Disconnecting from server"); Networks Close Connection (Network Connection [0], True); MasterServer.UnregisterHost (); //Why? } Else {Debug.log ("Not connected to server"); }} The solution is:
On behalf of the client, you must request from the master server before MasterServer.ClearHostList (); Need to call.
Comments
Post a Comment