Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

OnClientConnect and OnServerAddPlayer not triggering

Discussion in '5.2 Beta' started by sharat, Sep 1, 2015.

  1. sharat


    Jun 24, 2011
    The client NetworkManager gets OnStartClient() but doesn't seem to ever get OnClientConnect(). The server is getting the OnServerConnect() response before that but never gets OnServerAddPlayer() after calling either ClientScene.Ready(client.connection) or ClientScene.AddPlayer(client.connection, (short)0). These functions all seem to work fine when I'm running off of a single host with the second player added to the host client. Also of note, I'm getting a log about OnClientConnectInternal when I turn up the logs to developer mode, but still no call to OnClientConnect().

    I've been porting some networking code from Unity 4 and went up to 5.2 for the ClientAuthority features. I had basic stuff working in 5.1, but at some point I stopped receiving Client ready messages on the server. I've removed all special logic in my network manager and am just using the base version with extra logs statements and some (unused) keyboard shortcuts for running off of a single machine. Any help will be greatly appreciated!