PhotonNetwork.CountOfRooms Problem
Options
Storm
✭
Hello,
In a unity scene, the below code returns weird output and I do not undertand why. Do you have any idea? Btw, my main problem is, although I create a room, client can not join the room with JoinRandomRoom, I gues somehow cannot see the room, instead creates another room.
Max Players for Room: 4
Current Player No in Room: 1
Visible: True
Thanks in advance,
Cheers,
In a unity scene, the below code returns weird output and I do not undertand why. Do you have any idea? Btw, my main problem is, although I create a room, client can not join the room with JoinRandomRoom, I gues somehow cannot see the room, instead creates another room.
if (PhotonNetwork.InRoom && PhotonNetwork.CurrentRoom.IsOpen) { Debug.Log("Room Count: " + PhotonNetwork.CountOfRooms); Debug.Log("Max Players for Room: " + PhotonNetwork.CurrentRoom.MaxPlayers); Debug.Log("Current Player No in Room: " + PhotonNetwork.CurrentRoom.PlayerCount); Debug.Log("Visible: " + PhotonNetwork.CurrentRoom.IsVisible); }Room Count: 0
Max Players for Room: 4
Current Player No in Room: 1
Visible: True
Thanks in advance,
Cheers,
0
Comments
-
Hi @Storm,
Application or Lobby Statistics cannot be accessed when joined to a room.
They are available only when connected to a master server (connected but not joined to a room).0 -
Thanks a lot!0