Hosting Unity WebGL Games
Hosting Unity WebGL Games
Once your game is built for the Web, it should be hosted on a server so anyone with an Internet connection can play. However, you could also host it yourself on your personal website or portfolio site; many platforms such as WordPress or Squarespace come equipped with features for hosting WebGL content directly in their platform tools.
First, ensure your project is configured for WebGL by selecting WEBGL under FILE > BUILD SETTINGS. This will create a folder dedicated to hosting WebGL builds (this differs from your regular project folder) where they’ll reside; within this dialog you should fill in Company and Product Name fields with relevant details that should appear as header information on these WebGL builds; please be mindful that as they don’t include engine code this process could take time before being complete.
WebGL builds may take longer to download due to people’s expectations for offline downloads: They know they need to wait five or so minutes while downloading large games, and do not expect that from an online experience.
WebGL games require hosting costs and accessing services to run, which has proven prohibitively costly for creating high-performance 3D games on the Web. Unity has undertaken measures to address these concerns; in fact, its speaker sits on their standards committee to advocate for improvements.