I have a problem that might be trivial, but I cannot seem to solve or understand it.
I use Unitys Masterserver(the default one) atm to registerhost. I do
Network.Initializeserver(numPlayers, ACONSTVALUEFORPORT, !Network.HavePublicAdress());
When I poll the list from the masterserver from another client LOCALLY i get the local ip and the port is the same as my const. I list every hostdata received with ip:port (for future reference).
When I registerhost from a client on a machine with a public Ip I get a totally different port.
What looked like this from the office ;192.168.2.180:2001 //my const
looks like this if its from a machine with a public ip 80.201.201.45:19845
.
Why does the port change and is there any way to make force it on what I want?
Sorry for using codeblocks to display a simple strings. It just make the formatting easier.