NullReferenceException when using room.Name in OnCreatedRoom() .

I am getting NullReferenceException when using in OnCreatedRoom() .
Sample code:
TypedLobby tournamentStageLobby = new TypedLobby("TournamentStage", LobbyType.SqlLobby);
bool response = PhotonNetwork.JoinOrCreateRoom("892734897238947298374yoyoyoyo", newRoomOptions, tournamentStageLobby);

public override void OnCreatedRoom()
Debug.Log("OnCreatedRoom" +; // Error in this line



  • Hi @Okhla,

    when OnCreatedRoom is called on your client, this just means that the room has been created. At this point the client hasn't entered / joined the room. Please also implement the OnJoinedRoom callback. If this one gets called, should be available as well.
Sign In or Register to comment.