- Home /
Question by
NaBUru38 · Sep 24, 2016 at 07:13 PM ·
networkinglannetwork.connect
Cannot connect directly in local network
Hello, I'm making an online game. The master server system works fine, but the local network system doesn't. I have two similar functions:
// selectedHost comes from MasterServer.PollHostList();
void joinServer (HostData selectedHost)
{
NetworkConnectionError hasError = Network.Connect (selectedHost);
if (hasError == NetworkConnectionError.NoError) ...
}
// selectedHost comes from a text box
void joinDirectServer (string ipAddress, int ipPort)
{
NetworkConnectionError hasError = Network.Connect (ipAddress, ipPort);
if (hasError == NetworkConnectionError.NoError) ...
}
I've tried to connect to the same IP address and port with both functions. Why does the first function work and not the second? What is happening? Thanks?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612093428im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
[UNET] Raycast Update lag when Client connect 1 Answer
how manage network identity? 0 Answers
Server controlling Client- No errors in Console- LAN 0 Answers
UnityNetwork NetworkAddress setting? 1 Answer