cant override OnServerAddPlayer(). Yes i am using using UnityEngine; using UnityEngine.Networking; using: using System.Collections; using System.Collections.Generic; using UnityEngine.UI
public override void OnServerAddPlayer (NetworkConnection conn, short playerControllerId)
{
GameObject newPlayer = GameObject.Instantiate(playerCharacterPrefabs[playerControllerId%2]);
newPlayer.transform.position = Vector3.zero + Vector3.right * playerControllerId;
NetworkServer.Spawn(newPlayer);
// object spawned via this function will be a local player
// which belongs to the client connection who called the ClientScene.AddPlayer
NetworkServer.AddPlayerForConnection(conn, newPlayer, playerControllerId);
}
Some body can help me?
Comment
Your answer