UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"Create And Join Room By Using Photon SDK"
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using Photon.Pun; using TMPro; public class CreateAndJoinRoom : MonoBehaviourPunCallbacks { public InputField createRoom; public InputField joinRoom; public void CreateRoom() { PhotonNetwork.CreateRoom(createRoom.text); } public void JoinRoom() { PhotonNetwork.JoinRoom(joinRoom.text); } public override void OnJoinedRoom() { PhotonNetwork.LoadLevel("SampleScene"); } }