getting data from masterClient

Options
helpmewithphoton
edited August 2014 in Photon Server
I want to retrieve the PlayerList created at master client as it has all of the information of other clients adding to this list, how do I do this? I try doing [RPC] but I cannot get it to return something. Is there is a way to make RPC calls to return something to non master clients?


// on joined room, master client created a player list to store player info
private void OnJoinedRoom()
	{
		Debug.Log("We have joined a room.");
		bool bouusPoints =false;
		if (PhotonNetwork.isMasterClient) {
			photonView.RPC("CreatePlayerList", PhotonTargets.MasterClient);
			
			photonView.RPC ("AddtoPlayerList", PhotonTargets.MasterClient, bonusPoints, PhotonNetwork.playerName);
			
		}

		if (!PhotonNetwork.isMasterClient) {
		//Add to master player info list
                photonView.RPC ("AddtoPlayerList", PhotonTargets.MasterClient, bonusPoints, PhotonNetwork.playerName);

			// I want to retrieve the PlayerList created at master client as it as all of the information of other clients adding to this list at this point, how do I do this?
		}
	}
	
// a list created
	[RPC]
	void CreatePlayerList()
	{
		playerIDsReadyStatus = new List<PlayerListInfo> ();
		
	}

// a list created
	[RPC]
	void CreatePlayerList()
	{
		playerIDsReadyStatus = new List<PlayerListInfo> ();
		
	}