- Home /
Unity Networking : Ports
I am driven crazy with Unity network and its port management techniques. Looking into the documentation, I get no ideas to find a suitable solution to the problem I have below,
I use Network.IntializeServer() with a port number (#19191) and then have other hosts (players) getting connected to it.
Then in code I go about using Network.Instantiate() and then use RPCs here an there, as needed.
Now this works fine on a normal router config / LAN.
But in production, there seems to be an issue when the games tries to do a multi-player connectivity to sync data across. The environment has its own nature in production such as NAT enabled, firewall blocking etc.
Question: Is that only 19191 that I would have to enable port forwarding for UDP or would Unity use other ports to have the data synced using it Network frame work. If so what is the range of ports that I have to enable. Also, it there a way I can configure Unity to use a specified range.