Пример #1
0
 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);
 }
Пример #2
0
 /// <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);
 }
Пример #3
0
        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);
        }