I make standalone of ‘zero guide’'s example3 (lobby), and give it to another user, B (live in different region and of course another computer, IP).
I run myself (A) the example3 and start server, waiting for join.
Then B also run the application, but said to A that B can see the room made by A in the lobby menu, but B can’t join. When click [connect] error occur.
Strange thing is, if B start server, then A also can see the room and even can join that room made by B.
I have never messed around with the nat facilitator but i guess you need to test your connection before making a connection and based on that result change the connect string. But i could be wrong about it
maybe 3.x unity requires GUID connect for NAT punch through. So maybe this networking mechanic’s structure is, if someone start server, register that server to master server, and then other client do fetch list and also it’s GUID info, and then connect to that GUID ?
Network.Connect takes a couple different parameters. If you use the HostData object provided by the master server, it’ll automatically use the GUID, and attempt to do punchthrough if specified to be used upon starting a server.
If you look at the switch statement in the code on this page, you can see that nat punchthrough doesn’t work all the time either, as things like routers can change the ability to do it correctly
For middlewares like SFS and Photon it’s obvious because the server is the actual hoster, it doesn’t route your connection to another server.
All clients connect to the same server and the traffic is sent over that connection.
The masterserver is sort of a relay server that makes sure you can connect to a remote server.
Middlewares don’t have to provide Nat, ports or other stuff, it’s handled on the client side on the outgoing connection.