Players not joining/creating rooms. WebGL, wss, PUN2

Options
Hello.
I'm quite fresh. Need help.
Players pass the connecting and stay in matchmaking state. Everything works fine in localhost.
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;
using Hashtable = ExitGames.Client.Photon.Hashtable;
using System.Collections.Generic;
using ExitGames.Client.Photon;

public class LobbyManager : MonoBehaviourPunCallbacks

   private ConnectionProtocol TransportProtocol;

   
    public void ConnectedPlay()
    {
        this.TransportProtocol = ConnectionProtocol.WebSocketSecure;
        if (!PhotonNetwork.IsConnected)
            PhotonNetwork.ConnectUsingSettings();
            
    }

    public override void OnConnectedToMaster()
    {
        PhotonNetwork.AutomaticallySyncScene = true;
        FindMatch();

    }

    public void FindMatch()
    {
        PhotonNetwork.JoinRandomRoom();
        
    }
    public override void OnJoinRandomFailed(short returnCode, string message)
    {
        Debug.Log("creating room");
        MakeRoom();
    }

    void MakeRoom()
    {
        int randomRoomName = Random.Range(0, 5000);
        RoomOptions roomOptions =
            new RoomOptions()
            {
                IsVisible = true,
                IsOpen = true,
                MaxPlayers = 2
            };

        Hashtable RoomCustomProps = new Hashtable();
        RoomCustomProps.Add("P1Health", 0);
        RoomCustomProps.Add("P2Health", 0);
        roomOptions.CustomRoomProperties = RoomCustomProps;

        PhotonNetwork.CreateRoom("RoomName_" + randomRoomName, roomOptions);
        Debug.Log("room created - waiting for player");
    }

PhotonServerSettings:
https://ibb.co/sypJMHg


I add WebSocket folder in Assets/Plugins.
Unity 2019.4.1f1 LTS

Please, help :(

Comments