Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Join Or Create Room() photon

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);
    }
}
 
PREVIOUS NEXT
Tagged: #Join #Or #Create #photon
ADD COMMENT
Topic
Name
4+9 =