webgl not working on self hosted photon server
Options
hi all, im developing a simple host join game using unity on building a pc version 0 errors but when try to build a webgl version i get error
*********************************************************************
connect.cs file
*********************************************************************
UriFormatException: URI scheme must start with a letter and must consist of one of alphabet, digits, '+', '-' or '.' character.
System.Uri.Parse (UriKind kind, System.String uriString)
System.Uri.ParseUri (UriKind kind)
System.Uri..ctor (System.String uriString, Boolean dontEscape)
System.Uri..ctor (System.String uriString)
ExitGames.Client.Photon.SocketWebTcp.Connect () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/SocketWebTcp.cs:103)
ExitGames.Client.Photon.TPeer.Connect (System.String serverAddress, System.String appID, System.Object customData)
ExitGames.Client.Photon.PhotonPeer.Connect (System.String serverAddress, System.String applicationName, System.Object custom)
NetworkingPeer.Connect (System.String serverAddress, ServerConnection type) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:574)
PhotonNetwork.ConnectUsingSettings (System.String gameVersion) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1254)
connect.Start () (at Assets/connect.cs:11)
System.Uri.Parse (UriKind kind, System.String uriString)
System.Uri.ParseUri (UriKind kind)
System.Uri..ctor (System.String uriString, Boolean dontEscape)
System.Uri..ctor (System.String uriString)
ExitGames.Client.Photon.SocketWebTcp.Connect () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/SocketWebTcp.cs:103)
ExitGames.Client.Photon.TPeer.Connect (System.String serverAddress, System.String appID, System.Object customData)
ExitGames.Client.Photon.PhotonPeer.Connect (System.String serverAddress, System.String applicationName, System.Object custom)
NetworkingPeer.Connect (System.String serverAddress, ServerConnection type) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:574)
PhotonNetwork.ConnectUsingSettings (System.String gameVersion) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1254)
connect.Start () (at Assets/connect.cs:11)
*********************************************************************
connect.cs file
*********************************************************************
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class connect : MonoBehaviour { private PhotonView masterView; void Start () { PhotonNetwork.ConnectUsingSettings ("V1.0"); PhotonNetwork.automaticallySyncScene = true; } void OnGUI (){ GUILayout.Label (PhotonNetwork.connectionStateDetailed.ToString()); } public void HostRandomGame(){ PhotonNetwork.automaticallySyncScene = true; PhotonNetwork.CreateRoom (null); PhotonNetwork.LoadLevel ("level1"); } public void JoinRandomGame(){ PhotonNetwork.automaticallySyncScene = true; PhotonNetwork.JoinRandomRoom (); Debug.Log ("joined"); } //PHOTON READS THIS IF WE FAIL TO JOIN A AROOM!!// public void OnPhotonRandomJoinFailed(){ Debug.Log ("SERVER OFF LINE!!!"); } void OnJoinedLobby(){ Debug.Log ("joined lobby!!!"); } }
0