When i connect to my server the server player does not exist but on the server there is 2 players.
void OnLevelWasLoaded(int level) {
playerSpawner.GetComponent<PlayerSpawn>().spawnPlayer();
}
and on player spawner:
GameObject player = (GameObject)Network.Instantiate (playerPrefab, playerPrefab.transform.position, playerPrefab.transform.rotation, 1);
void OnLevelWasLoaded(int level) {
playerSpawner.GetComponent<PlayerSpawn>().spawnPlayer();
}
and on player spawner:
GameObject player = (GameObject)Network.Instantiate (playerPrefab, playerPrefab.transform.position, playerPrefab.transform.rotation, 1);