WebGL Stuck at ConnectingToNameServer

Hi, I am using Realtime on Unity for a cross platform game. I have it working on Standlaone, Android and iOS but I am stucking at ConnectingToNameServer on WebGL.
this is the conexion I am doing
this.client.ConnectUsingSettings(new AppSettings()
{
AppIdRealtime = SocialSecrets.RealtimeID,
AppVersion = "webGL",
NetworkLogging = DebugLevel.ALL,
});
And this is the stack trace I get:
WebGL requires WebSockets. Switching TransportProtocol to WebSocketSecure.
IPhotonSocket.Connect() ns.photonengine.io:19093 this.Protocol: WebSocketSecure
PeerCreated -> ConnectingToNameServer
PhotonClientWebSocket
And thats all, as I said I have it working on other platforms so ir should be some configuration I miss.
Did I have to configure something on the player settings? Do I have to configure something on the server side?
Thanks!
Comments
-
The
PhotonClientWebSocket
is not a class supported by Unity on WebGL.In the Realtime SDK for Unity, you should find the WebSocket folder and in it a WebSocket-sharp.dll, a JS library and other files. Those are needed to run on WebGL.
0 -
Thanks for the reply! I had the files, so the problem was different.
I created an assembly reference for the entire Photon folder and it seems that the webShockets are created using a string with the assembly reference, so when I encapsulated the entire folder I modified that reference.
For anyone with the same problem, just create 2 assembly references, one for Realtime and one for Chat as in the PUN package.
1