UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"ConnectServer by using Photon Pun SDK for Network"
using System.Collections; using System.Collections.Generic; using UnityEngine; using Photon.Pun; using UnityEngine.SceneManagement; public class ConnectServer : MonoBehaviourPunCallbacks { private void Start() { PhotonNetwork.ConnectUsingSettings(); } public override void OnConnectedToMaster() { PhotonNetwork.JoinLobby(); } public override void OnJoinedLobby() { SceneManager.LoadScene("CreateandJoin"); } }