Photon callback function is not working (OnjoinedRoom , OnjoinedLobby)

Options
I make Game Room and Game Lobby.

but I got to know OnRoomListUpdate() is not working.

I found reason. reason is OnJoinedLobby is not working.

OnRoomListUpdate() is OnJoinedLobby()'s callback function.

and i test OnJoinedRoom(). but this is not work too.

I noticed it through the Debug.Log()

But OnConnectedToMaster() is work well.

OnConnecteToMaster is callback function too!!

Why my OnJoinedRoom and OnJoinedLobby function is not work??

p.s I use PUN2.

and PhotonNetwork.JoinLobby and PhotonNetwork.JoinRoom() is work well

p.s 2 I try to same code of photon's Asteroids tutorial(LobbyPanel.cs)



public override void OnJoinedRoom()
{
base.OnJoinedRoom(); //I try to not contain base.OnJoinedRoom at code
Debug.Log("OnJoinRoom되라고 시발새끼야");
if (playerListEntries == null)
{
playerListEntries = new Dictionary();
}

foreach (Player p in PhotonNetwork.PlayerList)
{
GameObject entry = Instantiate(PlayerListEntryPrefab);
entry.transform.SetParent(InsideRoomPanel.transform);
entry.transform.localScale = Vector3.one;
entry.GetComponent().Initialize(p.ActorNumber, p.NickName);

object isPlayerReady;
playerListEntries.Add(p.ActorNumber, entry);
}

StartGameButton.gameObject.SetActive(CheckPlayersReady());


}
public void OnLoginButtonClicked()
{
PhotonNetwork.ConnectUsingSettings();

}

Answers

  • hxckid
    Options
    using Photon.Pun;

    Did you use this namespace in your project ?