Ping problem

Hi,

From where I am, connecting to any of servers (either Photon or Unity) gives me +300ms ping. Is there any way to solve this by something like making any of players as server?

I remember UNet being like this that if your NAT was open, it could connect directly and use relay server as a last resort. I’m positive that my NAT is open but when I run two instances of my game either with UNet or Photon’s PUN, I get +250ms ping.

Any idea?

I haven’t tried matchmaking, but if you’re using NetworkManager you can directly connect to an IP by setting NetworkManager.networkAddress and using NetworkManager.StartClient().

Won’t work that way from what I understood so far.

Well I did not use NetworkManager at all. If you use NetworkServer directly you can use the IP and port of the server to connect to it.
AFAIK MatchMaking uses the relay server only if the clients can not connect directly to the host (i.e. the host doesn’t have a public IP reachable from the internet).

Would you elaborate more on how to user NetworkServer directly?

In the manual in high level networking one of the last topics shows how to create a server and connect to it by Creating an instance of NetworkServer and starting a server/host. Or you can put NetworkManager in reflector (put the related unityengine.networking assembly in reflector) and examine the code.