can't create room

I used pun2.4.1, and I ran this program. It does not output "JoinedRoom" after outputting "Connected".
using Photon.Pun;
using Photon.Realtime;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class _TestPhoton : MonoBehaviourPunCallbacks {
// Start is called before the first frame update
void Start()
{
PhotonNetwork.ConnectUsingSettings();
}
public override void OnConnectedToMaster() {
base.OnConnectedToMaster();
Debug.Log("ConnectedToMaster");
Debug.Log(PhotonNetwork.JoinOrCreateRoom("room", new RoomOptions() { MaxPlayers = 14 }, default));
}
public override void OnJoinedRoom() {
base.OnJoinedRoom();
Debug.Log("JoinedRoom");
}
}
Answers
-
Calling JoinOrCreateRoom in Debug.Log is quite creative. What does that log in your case?
If OnConnectedToMaster() gets called, OnJoinedRoom() should get the callback, too.
0