Can't see other connected players with FindFriends or PhotonNetwork.playerList

Options
So I have a weird problem I don't have the solution for. What I am tryting to do is to get the status information about a list of friends and I do this:
void SomeFunction()
{
List friendsList = new List();

foreach (string str in dict.Keys)
{
string name = dict[str];
friendsList.Add(name);
}
//we send (as string[]) them to photon chat so that we can receive information about their status
PhotonNetwork.FindFriends(friendsList.ToArray());
StartCoroutine(WaitForFriendsAndPopulateFacebookFriendsList(dict));
}
Then I start coroutine to check when PhotonNetwork.Friends is not null.. but all the Friends I get are offline even though I started 2 applications at the same time and both connected to Photon with different names that I passed in.

Then I decided just to check playerList property:

PhotonNetwork.playerName = ourPlayer.name;
PhotonNetwork.ConnectUsingSettings ("1.0");

//code just for debugging
if (PhotonNetwork.playerList != null) {
int br = 1;

foreach (PhotonPlayer player in PhotonNetwork.playerList) {
Debug.Log (br + ": " + player.name);
}
} else
Debug.Log ("PlayerList is null");

the list returns only our player even though there are another connected to the server !
I am just confused why isn't this working when those players could join the same room and play game with no problems but they cant find each other on the PhotonNetwork.playerList.

Thanks in advance,
Ilko

Comments

  • vadim
    Options
    What is the client state when you calling PhotonNetwork.FindFriends()?
    Client should be connected to the master server for successful call.
  • Ilkp
    Options
    Both players are in the Lobby...
  • vadim
    Options
    Who is in the room then? You need at least 1 player in the room or it's destroyed automatically in couple of seconds after last player left the room.
  • Ilkp
    Options
    I know what the problem is but I need to post another question for that? I think it's because application goes in background on iOS..
  • vadim
    Options
    New discussion would be ok