I’m new to Photon. Our new game is connecting and working in both the Unity editor and Windows build correctly. However, when we host the WebGL build on either itch.io or Unity Play (using the WebGL publisher), Photon does not connect to the server.
The line of code below seems to just not get called when it is a hosted WebGL build.
Make sure it’s not called.
E.g. add Debug.Log("Calling ConnectUsingSetting") before and after this line.
Check the browser’s JS Console for any errors.
Tried that, definitely not connecting. In the web browser the error we are getting:
““afbc6604-f456-439a-9f61-48a5fd535963:8 JoinOrCreateRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster.””
We don’t support PUN Classic anymore. I would recommend an update but if your game is otherwise done and working … we won’t stop you releasing it.
If I am not connecting to the server, what callback would I receive?
Check the return value of the connect method. Is it false, there won’t be a callback. If it’s true but there is another error, there is an OnDisconnected callback. The reference docs and in-code comments should point this out.
In doubt, the PUN Basics Tutorial also covers these topics.