UNet NetworkServer max connections

Is it possible to change number of max. connections for NetworkServer? It looks that the default value is 8.

When I am trying to setup it this way (e.g. with 100 connections):

ConnectionConfig config = new ConnectionConfig();
NetworkServer.Configure(config, 100);

then all clients throw error UNet Client Disconnect Error: CRC Mismatch.

Thanks for responses.

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 ();
    	}
    }

Only on the Server :

manager = GetComponent<NetworkManager>();

    var config = new ConnectionConfig();
    config.AddChannel(QosType.Reliable);
    config.AddChannel(QosType.Unreliable);

    manager.StartServer(config, maxConnections);

Client needs nothing other than :

manager = GetComponent<NetworkManager>();

    manager.StartClient();

Assuming you are using or are deriving from the NetworkManager.