방금 OnReceivedRoomListUpdate
함수에서 방 목록을 가져 왔지만 최근에이 함수의 내부에있는 PhotonNetwork.GetRoomList()
은 항상 빈 배열을 반환합니다. 내가 PUN v1.51
을 사용하고GetRoomList()는 항상 빈 배열을 반환합니다.
public class RefreshRooms : Photon.PunBehaviour {
...
void Start() {
PhotonNetwork.autoJoinLobby = true;
...
Refresh();
}
// Update is called once per frame
void Update() {
// FYI: Here, PhotonNetwork.countOfPlayers gives the correct count of players currently in the lobby
}
...
public void Refresh()
{
...
PhotonNetwork.Disconnect();
PhotonNetwork.ConnectUsingSettings("v3");
}
void OnJoinedLobby()
{
// Display 'Fetching Rooms List...' message
...
}
void OnReceivedRoomListUpdate()
{
// Here PhotonNetowrk.GetRoomList().Length always gives 0, even if there are rooms
// Also, this function is getting called only once in the entire lifecycle
// FYI: PhotonNetwork.insideLobby gives true here
...
}
}
:
여기 내 코드입니다. 지금 구현해야하는 API에 변경이 있습니까?
반환되는 배열의 길이는 얼마나됩니까? 또한,이 함수를 사용하는 방법을 게시 해주십시오. – Programmer
@Programmer PhotonNetwork.GetRoomList(). 길이가 0이고 또한 모든 라이프 사이클에서 항상'OnReceivedRoomListUpdate()'함수가 한 번 호출됩니다. –