Why do I get "A connection has already been set as ready." Error

So I implemented my own NetworkManager because I wanted to spawn different PlayerPrefabs depending on some selection and tell the Player Name. For now I want to get it to work to send the PlayerName over the Network from Client to Server. So These are the Code lines:

public override void OnClientConnect(NetworkConnection conn) {
    StringMessage msg = new StringMessage(_playerName);
    ClientScene.AddPlayer(conn, 0, msg);

public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId, NetworkReader extraMessageReader) {
    string customParameters = "";
    if (extraMessageReader!=null) {
        customParameters = extraMessageReader.ReadString();
    _playerName = customParameters;

    GameObject o = Instantiate(spawn) as GameObject;
    MyPlayerCharacter mpc = o.GetComponent<MyPlayerCharacter>();
    mpc.playerName = _playerName;
    NetworkServer.AddPlayerForConnection(conn, o, playerControllerId);

but now I get the following Error allready when I start to Host a Server:

A connection has already been set as ready. There can only be one.

this Error disappears when I comment out the following line of Code:

ClientScene.AddPlayer(conn, 0, msg);

So could anybody explain me what I’m doing wrong or what I’ve missed out?


		if (string.IsNullOrEmpty (this.onlineScene) || this.onlineScene == this.offlineScene)
			ClientScene.Ready (conn);
			if (this.autoCreatePlayer)
				 ClientScene.AddPlayer(conn, 0, msg);

instead of only

     ClientScene.AddPlayer(conn, 0, msg);

this is the code used by the standard networkManager