2

So I have a game that I want to export to WebGL. It uses Unity's latest networking solution uNET (Unity Networking) and I've selected the *use websockets option.

Currently, WebGL clients cannot be a server. Thus in order to host a game, I am doing it when I run the game through the editor. Then in the browser, I can join the game as a client.

So obviously I don't want to leave my computer on to be the host through the editor while people in the web join as clients.

I'm thinking that I should build the game in standalone and run the standalone game on some server and join the game as host. Then of course I leave the server on 24/7 so anyone can join through the web. But I have no idea how to accomplish this (i.e. what services to use) or if this is even the right approach.

gman
  • 100,619
  • 31
  • 269
  • 393
Pius Nyakoojo
  • 106
  • 1
  • 10

1 Answers1

0
  1. You need a dedicated server or VPS with root access. You can avail this service from many hosting companies like GoDaddy or DreamHost. Get an Ubuntu Linux OS.
  2. Create a Standalone headless linux build.
  3. Upload it to your server via scp.
  4. Run it via ssh.