SquareDash/Assets/Scripts/ConnectToServer.cs
kingjuulian06 0b8d48c207 PauseMenu
2023-11-22 00:07:53 +01:00

27 lines
520 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using UnityEngine.SceneManagement;
public class ConnectToServer : MonoBehaviourPunCallbacks
{
// Start is called before the first frame update
void Start()
{
PhotonNetwork.ConnectUsingSettings();
}
public override void OnConnectedToMaster()
{
PhotonNetwork.JoinLobby();
}
public override void OnJoinedLobby()
{
SceneManager.LoadScene("Lobby");
}
}