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. Dismiss Notice

Question what solution for WEBGL multiplayer game?

Discussion in 'Multiplayer' started by exe2k, Jun 2, 2023.

  1. exe2k

    exe2k

    Joined:
    Oct 26, 2015
    Posts:
    63
    I made some prototypes for LAN earlier, but the question is how to create dedicated server build for WEBGL games? smth like in .io type games. If I build WEBGL with NetCode for Game Objects it reasonably says in console that it's impossible to use UDP w\ webgl builds.

    So what is the solution if I want to have a dedicated server on VDS for WEBGL mmo?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,609
    You would use WebSockets. Netcode has support for that, but I believe it's not built-in.

    What is VDS?

    Just in case you meant what this statement implies: You cannot have a server than runs in the browser, it is technically not possible. You have to create a Linux or Windows dedicated server app and host it somewhere, or use Unity Gaming Services to host it for you.