Network.TestConnection how to?

Hi,

I’m currently trying to figure out just how Network.TestConnection works. The thing that confuses me the most, is that we are able to set Network.connectionTesterIP and Network.connectionTesterPort.

So I though, if I want to test my Network capabilities, I just set connectionTesterIP as 127.0.0.1 and the port to the one I want to open up if I create a server. However, when I do this, I always get Undetermined in Network.TestConnection. And what confuses me more (maybe it is a bug?), if I try again to determine the network capabilities without setting the IP and Port (like it is on the example in Network.TestConnection documentation) I always get Error. In order to make it work again, I have to close unity and relaunch it.

So, basically, when should I use connectionTesterIP and Port? When I want to get info about a server that is not registered with MasterServer (i.e. direct ip connection)?

Regards,
Afonso

When Unity tests the connection to a specific server, the server must already be running (if I remember correctly).
So before starting the test, start the server.

You can run the connection test any time, no need to start a server.
The connection tester runs on the same IP as the master server and just helps to establish, from outside, whether you are on a public/private IP and if you are NAT punchable.