GetRoomList Error for new Clients
Options
When a new client joins the lobby and a room is already created, it gives me this error:
I'm just using this:
InvalidCastException: Cannot cast from source type to destination type.
I'm just using this:
void OnGUI() { foreach (Room game in PhotonNetwork.GetRoomList()) { GUILayout.Label(game.name + " " + game.playerCount + "/" + game.maxPlayers); } }
0
Comments
-
void OnGUI() { foreach (RoomInfo game in PhotonNetwork.GetRoomList()) { GUILayout.Label(game.name + " " + game.playerCount + "/" + game.maxPlayers); } }
I think should be RoomInfo instead of Room in your foreach loop0