How to connect to photon with a webGL game?
Options
I have a webgl game, I embedded it into my website and the game worked until I got to the point where I had to connect to photon server.
My question is: Is there any specific ways I have to connect to photon with a webgl game?
(I am using Web Sockets Secure in my photon settings)
My question is: Is there any specific ways I have to connect to photon with a webgl game?
(I am using Web Sockets Secure in my photon settings)
0
Answers
-
0
-
I was using unity webGL0
-
@Argentum_Manus
what server sdk are you using self hosted or you try connect to cloud?
if you are using self hosted try connect to cloud first.
what type of websocket connection are you establishing? Secure or insecure? Secure are not supported out of the box by self hosted version. You need to install certificates and update configuration.
best,
ilya0 -
I am connecting to the cloud with Unity Pun Free, and I am using a Secure websocket connection0
-
Hi @Argentum_Manus,
Thank you for choosing Photon!
PUN works out-of-the-box with Photon Cloud using WSS (WebSocketsSecure).I embedded it into my website and the game worked until I got to the point where I had to connect to photon server.What do you mean by this? What errors do you see? Does your game work from Unity Editor first?
What Unity version and what PUN version are you using?
Try out demos using WSS from Unity Editor in a fresh project and from a build and tell us if it works or not.0 -
I am using the newest version of PUN and the game fully works with windows standalone and inside the editor. And I am using unity 2018.1.
As far as errors go, I don't see any, the game just doesn't connect to photon.
(I will reply later if the demos work when exported)0 -
hi, @Suraj
there is not too much to say.
first setup and get it working with tcp or udp, than we non secure web sockets
and than with secure
using this page you can find information about certificate setup https://doc.photonengine.com/en-us/server/current/operations/certificate-setup
One important note is that bin_Win64/PhotonServer.config contains bug. Urls like `Url="/*" ` should be replaced by `Url="/+"`
best,
ilya0