need Multiple JoinInLobby Detector

Options
hi All,
im using Photon Network Unity as network solutions, its great;
in my game project, i use an scene to Login as username and password, and then the username to be PhotonNetwork.PlayerName.
...
my problem is i need to create multiple login system, and as simple code, i use :
	void Update ()
	{
		if(PhotonNetwork.insideLobby && PhotonNetwork.countOfPlayers > 1)
		{
			foreach(PhotonPlayer p in PhotonNetwork.otherPlayers)
			{
				if(p.name == PhotonNetwork.playerName)
				{
					Debug.Log("Multiple Login Found " + p.name);
					PhotonNetwork.Disconnect();
				}
			}
		}
	}

result said : otherPlayers always 0,
what can i do to solve this?

Comments

  • vadim
    Options
    Hi,

    PhotonNetwork.otherPlayers returns players joined to current room. It's empty while you are in lobby (not joined any room)
  • what can i do to find players in lobby, inc. name or other attributes?
  • vadim
    Options
    Photon does not provide list of players in lobby.
    You can only get statuses (in lobby, in room, offline) of users with known names with PhotonNetwork.FindFriends call.
  • maksimov
    Options
    vadim said:

    Photon does not provide list of players in lobby.

    You can only get statuses (in lobby, in room, offline) of users with known names with PhotonNetwork.FindFriends call.

    I can only call PhotonNetwork.FindFriends when I'm already connected.
    And when I'm connected, my status will always be online. )))

    So how to solve this problem?

    I just do not understand how other people use Photon Cloud, when there is no way to avoid a multiple login. (((