Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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:
    6,437
    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.