UnityEngine.Networking.NetworkServer.AddPlayerForConnection C# (CSharp) Method

AddPlayerForConnection() public static method

When an AddPlayer message handler has received a request from a player, the server calls this to associate the player object with the connection.

public static AddPlayerForConnection ( NetworkConnection conn, GameObject player, short playerControllerId ) : bool
conn NetworkConnection Connection which is adding the player.
player UnityEngine.GameObject Player object spawned for the player.
playerControllerId short The player controller ID number as specified by client.
return bool
        public static bool AddPlayerForConnection(NetworkConnection conn, GameObject player, short playerControllerId)
        {
            return instance.InternalAddPlayerForConnection(conn, player, playerControllerId);
        }

Same methods

NetworkServer::AddPlayerForConnection ( NetworkConnection conn, GameObject player, short playerControllerId, NetworkHash128 assetId ) : bool