Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Unity WebGl Multiplayer game.

Discussion in 'Multiplayer' started by fabledxx, Dec 23, 2022.

  1. fabledxx


    Jul 24, 2020
    Is it possible to make a multiplayer game in WebGl using unity, without having to recreate almost all the tools that are in the gaming multiplayer services and netocode, and without having to learn another programming language?
  2. CodeSmile


    Apr 10, 2014
    WebGL networking runs on WebSockets and I‘m not 100% sure whether this works with UGS. With NGO you need to use the WebSockets transport which is a community supported transport.

    For certain you cannot have webgl instance be the host or server, just in case you didn‘t know.
    fabledxx likes this.
  3. simon-lemay-unity


    Unity Technologies

    Jul 19, 2021
    Unity Transport 2.0 has support for WebSockets, which is an alternative to the community-supported transport. However, this version is only supported on Unity 2022.2 and later (the community transport has wider editor support I believe).

    Unity Relay was also recently updated to support WebSockets, but note that this is still experimental (and undocumented). Also currently the only way to leverage this support is through Unity Transport 2.0, which means using 2022.2+. I believe the Lobby service should also work on WebGL, since we got Boss Room working on that platform.
  4. wanlwanl


    Jul 7, 2022
    I think Azure Web PubSub Transport is just for you, which is based on unity netcode, transport protocol and websocket, the only thing you need to do is to install and select the new transport. Here's the quick start video (2 min)