hi!!!
i have this extrange behaviour.
i created a simple lobby, and when a player joins, he is added twice to TNManager.players
this is the code for creating and joining the channel:
if (Input.GetKeyDown(KeyCode.Alpha5)) {
TNManager.JoinChannel(0,"lobby1");
}
and this is how i finally noticed that they were duplicating:
void OnGUI ()
{
string players = null;
players = TNManager.players.size + " players\n";
//TNManager.
for (int i =0; i<TNManager.players.size;i++){
players += TNManager.players[i].id + "-" + TNManager.players[i].name + "\n";
}
GUILayout.Label(players);
}
when 1 player joins it says
2 players
2 Guest
2 Guest
when another player joins it says:
4 players
2 Guest
2 Guest
3 Guest
3 Guest
the last player that joins will see the information correctly, i mean: every user only once.
but if a new player joiins after him he will see him duplicated!!
what could be causing this?