Network initializing player

Hello,

I’m trying to get co-op working with unity but i got a little problem while spawning new players.

With the first script i can’t get the new player see the old player, i understand why it’s not doing it. But when i do it the second way, I get every time someone joins and spawns, the olders also get a new character controller.

there is the first way (that is obvious for me why it doesn’t work):

    void Start()
	{
		Debug.Log("Spawning the player locally");
		Spawnplayer();
	}
	
	void Spawnplayer()
	{
		Debug.Log("Spawing another player");
		Network.Instantiate(PlayerPrefab, transform.position, transform.rotation, 0);
	}

The other way:

void Start()
	{
		Debug.Log("Spawning the player locally");
		//Spawnplayer();
		networkView.RPC("Spawnplayer", RPCMode.AllBuffered);
	}
	
	[RPC]
	void Spawnplayer()
	{
		Debug.Log("Spawing another player");
		Network.Instantiate(PlayerPrefab, transform.position, transform.rotation, 0);
		//Instantiate(PlayerPrefab, transform.position, transform.rotation);
	}

Script Reference says: Valid RPC parameters are int, float, string, NetworkPlayer, NetworkViewID, Vector3 and Quaternion.
Having a Transform as parameter type is still legal because you could call the function the usual way. However the RPC call can’t handle it - correctly logging an Error that directs you to the function declaration of SpawnPlayer.