using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;
public class JoinToMainRoom : MonoBehaviourPunCallbacks
{
public void CreateOrJoinRoom()
{
RoomOptions roomOptions = new RoomOptions();
roomOptions.IsVisible = true;
roomOptions.MaxPlayers = 20;
PhotonNetwork.JoinOrCreateRoom("Game", roomOptions, TypedLobby.Default);
}
}
// Join room "someRoom"
PhotonNetwork.JoinRoom("someRoom");
//Fails if "someRoom" is not existing, closed or full. Error callback: IMatchmakingCallbacks.OnJoinRoomFailed
// From LoadBalancingClient.cs
public void OnOperationResponse(OperationResponse operationResponse)
{
//...
this.OnJoinRoom(name);
}