title: Sending RPC to add playerName
body: <p>I'm trying to make it so, whenever a Player Connects to the server, it transfer it's selected name, over to the RPC, which then will update the Player Game Object for everyone. But this seems to give following error:</p>
  
  <blockquote>
    <p>Sending RPC failed because 'setPlayerName' parameter 0 (UnityEngine.GameObject) is not supported.</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>void OnConnectedToServer() {
      GameObject newPlayer = (GameObject)Network.Instantiate(newPlayerPrefab, new Vector3(0,0,0), Quaternion.identity, 0);
      networkView.RPC("setPlayerName", RPCMode.AllBuffered, newPlayer);
  }
  
  [RPC]
  void setPlayerName(GameObject newPlayer) {
      newPlayer.name = "Player_" + playerName;
  }
  </code></pre>
  
  <p>If this isn't the correct way to change the new spawned player's <code>gameObject</code> name, then please help me with a way, that actually is the correct way.</p>