How do I create a server in WebGL? When I start up the WebGL version of the game, I get this:
Is WebGL networking even possible?
Enable âUse WebSocketsâ in Network Manager.
It still doesnât let me create a server or use match maker.
WebGL version cannot be server.
Run one Windows instance as server. Then WebGL-instance can connect to server as client.
Thanks mate! I got it to work.
i dont understand what you mean Yuri
WebGL cannot act as a server. Use a Windows or other standalone platform build as the server. By default Unet on all platforms other than WebGL will use UDP for Unetâs network transport, but WebGL is not capable of using UDP, only Websockets. So you tell the standalone build to use Websockets instead of UDP so WebGL clients can talk to it.
https://docs.unity3d.com/ScriptReference/Networking.NetworkManager-useWebSockets.html
kindly tell me how to set multiplayer using WebGL ?? i upload webGL build on Domain(Server) and try to play multiplayer game by running two instances on different laptops but it didnt work for me both players cant find each other. Kindly help
You donât mention a game server theyâre connecting toâŚdo you have one? Are they both able to connect to it?
i upload the build file on server and both players open the file but they cant find each other please help me
There isnât any magic - you still need a game server hosted somewhere for both players to connect to. It sounds like youâve created a single player game with no networking and no game server.
I mention the server IPaddress in Network Manager Still it didnt make connection between two clients
If u help me it will be very honourable for me
You need a SERVER
You will not be able to âmake connection between two clientsâ. You need a standalone build (not WebGL, instead Windows/Linux/Mac, etc) set up to act as a server which the two clients connect to. You will also need to make sure the server build is set to use websockets.
using PC/Windows/Linux it works well but i want to Make i webGL -_- it didnt work . Do u have any idea ??
nd i want to upload my game on domain(server) and make two clients to connect with each other. Any idea how to do ??
am getting this issue on executing webgl html page "Uncaught TypeError: Cannot read property âidâ of null "
plz help me to solve this
WebGL uses websockets, youâd have to configure your standalone server build to use websockets instead of UDP in order for the WebGL build to be able to connect to it.
Clients donât connect to each other, period. Not sure if youâre meaning something different, or donât understand how it works, but the clients in order to affect each other will do so through their connection to the same server.
Wanted to add to this thread that the aforementioned websocket process worked for me, but I had to use Firefox instead of Edge in order for it to work. Iâm using 2019.3.0a7, and auto graphics api which when I turn off goes to WebGL 2.0⌠I believe this means that it also wonât work with IE and I am using Chrome 75 which also didnât work.