RPC call for specific player not executed?

function OnPlayerConnected(player: NetworkPlayer) {
	Debug.Log("I show up!");
	// send the connected ply an unique ID (Time.time) and name.
	// variables will be placed in a component with NetworkView, other
	// players will also get these details eventually coz of this.
	networkView.RPC("assignUserDetails", player, Time.time, "testuser");
	}

function assignUserDetails(uniqueID : int, playerName : String, info : NetworkMessageInfo) {
	var plLocal = GameObject.Find("playerlocal");	
	plLocal.GetComponent(char_mydetails).myID=uniqueID;
	plLocal.GetComponent(char_mydetails).myName=playerName;
	GameObject.Find("playerlocal/test").GetComponent(TextMesh).text=playerName;
	}

The code above is placed on an object that has a network view (no state sync, no observed component). But, the RPC is never executed.

What I am trying to accomplish:

  1. the server receives onPlayerConnected
  2. sends an RPC to the connected player
  3. the connected player that receives the RPC places user details in the
    local player object.
  4. The component where these user details are stored contains a network
    view, so as soon as his/her name and user id are stored, the other players should have this information as well.

So (3) doesn’t work…
Thanks for your patience! We need a scripting->networking forum :slight_smile:

after way too much time, I figured it out :smile: . I had to be more specific on the parameters that go in the RPC.