Search Unity

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:
    5,892
    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.