Unity WebGL game, problem connecting from remote computer

Options

Hello,


I have a WebGL game that I've built and I'm trying to get multiplayer working on multiple computers. I've got a WebGL build that works fine on the computer that is running the PUN2 server, but when I try to connect from another computer, I get this message in the console of the browser: "WebSocket connection to ws://localhost:9090/Master/? libversion = 4.1.6.11&sid=30&app=' failed:


In the PhotonServerSettings.asset in Unity, I've set the Server to the local ip address(192.168.1.xxx) of the computer that is running the PUN2 server.


Can anyone point me in the direction I should look to figure out where remote clients are being told to try localhost to connect to the server?


Thanks in advance,

Answers

  • Ayrizale
    Options

    I'm still a noob with Unity multiplayer and with Photon specifically. After more searching, I discovered that I had failed to properly configure the GameServer.xml.config, Master.xml.config, and Nameserver.json files in the Photon ServerSDK. My program appears to be working correctly now.

  • sheldenwhobrey
    edited June 2022
    Options

    I think the main issue in your case is the network adapter. Remember that you don't need to use the VPN services if you want to connect the remote user with your workplace. At least ensure that your remote connection address is the same as your VPN server. Keep in mind that this only works with dedicated VPN services. If you are using the VPN services like Surfshark, this action doesn't help. In any case, I suggest you double-check your network adapter at any local repair service like the Laptop screen repair Poole service in your area to ensure that network adapted is working so you can look only for code errors.