- Home /
Question by
JaggerMcClaw · Nov 21, 2014 at 03:56 PM ·
networkingportrequired
Unity Networking Ports
I'm working on a small multiplier game for a school project, and at home I've gotten it to work perfectly. Unfortunatly, on campus each port used needs to be requested and opened beforehand, and opening only port 25000 didn't seem to work, and we aren't quite sure if it's the connection, or the game that is the problem.
private const string typeName = "GameMode";
private const string gameName = "ServerName";
private const int maxPlayers = 4;
private const int portNumber = 25000;
private void StartServer()
{
Network.InitializeServer(maxPlayers, portNumber, !Network.HavePublicAddress());
MasterServer.RegisterHost(typeName, gameName);
}
What are all the ports necessary to make this work? Would this work with just 25000 open, and it just hasn't been opened properly?
Comment