PhotonNetwork.otherPlayers returns empty array

Options
I have 2 clients running and neither return a proper list of players. I've also tried PhotonNetwork.playerList and it only returns the local player, never the remote player.

Anyone else have this issue?

--edit--

Maybe I found the issue -- is there any chance this is available when inside a room? If so, is there a way to get a list of users that are in the lobby?

--edit--

Comments

  • Tobias
    Options
    There is no way to get a list of users in the lobby. Potentially, you have thousands of players. That list is would just neither help nor make things leaner.
    You can match players and then get the lists in the rooms. For the users, it doesn't really matter if they hang out in the lobby or some room. In both cases, they will wait until enough players are there to play.
  • carmine
    Options
    Tobias wrote:
    There is no way to get a list of users in the lobby. Potentially, you have thousands of players. That list is would just neither help nor make things leaner.
    You can match players and then get the lists in the rooms. For the users, it doesn't really matter if they hang out in the lobby or some room. In both cases, they will wait until enough players are there to play.

    Tobias.... how would my Lobby have "thousands" of players... i'm sure most of us have the under 1,000 CCU package. Or does a lobby player not count towards our CCU?
  • Tobias
    Options
    carmine: We have to use general rules.
    We can't use player lists for games with few players and then disable features as soon as a games becomes successful with thousands of players. Right?
    We already have some games with several thousand CCUs running on our servers. Because we can't have chat or players lists in the lobby there, we can't solve those features.
  • HI how can I easily get the nickname while calling this

    OnFriendListUpdate(List<FriendInfo> friendList )

    pls help

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options

    Hi @tataygames,

    FriendInfo contains the UserId of the friend and not the Nickname.

    You should have a way of mapping UserId with Nickname.

    Usually a friend system works best with an external service that saves the friends list + friend info. Photon just needs a unique identifier of the friend to be able to locate it and identify it. We use the UserId for this.

  • Okay thank you! I get it :)

    Btw is there a way that I press challenge to my app, and my friends phone will popup a message saying Im challenging him?

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options

    Hi @tataygames,

    I answered here.