Ok, finally I found fix. The issue was that client must have also attached connection config (dunno why). Then I needed to setup channels because config does not defined any.
server:
ConnectionConfig config = new ConnectionConfig();
config.AddChannel(QosType.ReliableSequenced);
config.AddChannel(QosType.Unreliable);
NetworkServer.Configure(config, MaxConnections);
NetworkServer.Listen(Port);
client:
client = new NetworkClient();
ConnectionConfig config = new ConnectionConfig();
config.AddChannel(QosType.ReliableSequenced);
config.AddChannel(QosType.Unreliable);
client.Configure(config, 1000);
client.Connect(IpAddress, Port);
Was having the same issue but tried a different fix: enable advanced configuration in your network manager and set the maximum number of connections there. I couldn’t add more than 8 players on a LAN game I’m developing until I made that change.
Hi @hMark Not sure if your using the new networking in unity 5, but you can also set the max connections on the NetworkManager…
Heres an example:
using UnityEngine;
using System.Collections;
using UnityEngine.Networking;
public class StartServer : MonoBehaviour {
string HostName = "127.0.0.1";
// Starts the server as host
public void _StartupHost()
{
NetworkManager.singleton.networkPort = 7777;
NetworkManager.singleton.maxConnections = 50;
NetworkManager.singleton.StartHost ();
}
// Connects to the server as a client
public void _JoinWorld()
{
NetworkManager.singleton.networkAddress = HostName;
NetworkManager.singleton.networkPort = 7777;
NetworkManager.singleton.StartClient ();
}
}