How do I use RoomInfo?

Options
In my script, I would like to check if the player count of a room and maximum amount of players allowed are the same. If they are, a new scene would load. After attempting to do so, I got an error telling me that RoomInfo.maxPlayers and RoomInfo.playercount did not exist. I tested and Debug.Log(PhotonNetwork.RoomInfo) proves that RoomInfo is null even though I currently am in a room. PhotonNetwork.Room is also null. Why is this?

Thanks in advance.

Comments