So I am trying to get a game lobby running for my game like this:
I create a game room like this:
Network.InitializeSecurity();
Network.InitializeServer(int.Parse(maxPlayers), int.Parse(port), !Network.HavePublicAddress());
MasterServer.RegisterHost(gameName, serverName);
And a client joins this lobby like this:
Network.Connect(c);
This works but the server initializer does not count as a player. This tells me that we have only one player connected:
Debug.Log(Network.connections.Length);
And if I connect to my server the same way as my client but on my server machine, the server gets disconnected.
Do I have to make the host a connected player the same way as the client? What am I not understanding correctly?