public virtual void OnServerReady(NetworkConnection conn) { if (conn.playerController == null) { // this is now allowed (was not for a while) if (LogFilter.Debug) Debug.Log("Ready with no player object"); } NetworkServer.SetClientReady(conn); }
/// <summary> /// Called on the server when a client is ready. /// <para>The default implementation of this function calls NetworkServer.SetClientReady() to continue the network setup process.</para> /// </summary> /// <param name="conn">Connection from client.</param> public virtual void OnServerReady(INetworkConnection conn) { if (conn.Identity == null) { // this is now allowed (was not for a while) if (LogFilter.Debug) { Debug.Log("Ready with no player object"); } } server.SetClientReady(conn); }
public virtual void OnServerReady(NetworkConnection conn) { if (conn.playerController == null) { // this is now allowed (was not for a while) if (LogFilter.Debug) { Debug.Log("Ready with no player object"); } } // Spawn observers if no player. // Otherwise, do it when add player. bool spawnObservers = (playerPrefab == null); NetworkServer.SetClientReady(conn, spawnObservers); }