GetNext() return null
Options
Comments
-
It should only be null when you are not in a room or if there are not enough players in the same room.
Are you calling this when you join or mid-game?
It would help, if you could debug through GetNext() and see which case you get into that return null. We can't do that without a repro case.0 -
in join. But after join, and when I debug log currentroom.players.count , the result is zero. What happened?
And what should I do to make players join into room?0 -
Within Join, maybe the player list is not yet filled and you ask for the next player "too early". Not sure.
The players.count in a room should never be 0 unless you left a room.
Maybe it's easier to help, knowing what you try to achieve.0