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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Poll: Which web server would you like to see more hosting documentation about?

Discussion in 'WebGL' started by jukka_j, Oct 6, 2020.

?

Which web server would you like to see more hosting documentation about?

Poll closed Dec 6, 2020.
  1. Apache

    20.8%
  2. AWS

    29.2%
  3. Facebook

    4.2%
  4. IIS

    12.5%
  5. Itch.io

    12.5%
  6. Nginx

    37.5%
  7. Node.js

    25.0%
  8. Python

    4.2%
  9. Other, please mention in the comments

    16.7%
Multiple votes are allowed.
  1. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
    In the past we have generally pointed people to look at the specific web server documentation for how to configure Content-Encoding, MIME and other CORS related web server fields correctly. Our documentation so far has only visited the very WebAssembly-specific Wasm Streaming configuration requirement (at https://docs.unity3d.com/Manual/Webgl-Server-configuration-for-WebAssembly-streaming.html )

    Reading through the forums, it looks like this aspect causes a lot of general work, since different web servers all use different mechanisms to configure hosting. To make things more tedious, web browsers are introducing a new set of headers, COOP and COEP, slightly similar to CORS rules, for multithreaded applications.

    We do now have Unity Connect that automates these aspects ( see https://docs.unity3d.com/Manual/com.unity.connect.share.html ) so users targeting Unity Connect will have an easy time.

    However to help other developers manage the manual work, I am wondering if this should be something that we would take on directly in Unity docs, or visit in a blog or forum entry. And if so, we would be looking to document the most commonly used web servers/hosting services that Unity game developers use, for most benefit to users.

    Hence the poll: what web hosting (server software/service) are you using to host Unity content? Also, how easy was it to set up, e.g. for gzip compressed content? Was the needed info readily available for that system, or would it have helped to see specific documentation for that in Unity docs?
     
  2. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    492
    I like to use Netlify. It's awesome and very easy to use! That's what I use for testing. My clients always use AWS though. Here's my .toml file for brotli compression.
     
  3. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    379
    Would like to see support easier/faster iteration of development builds locally as well.

    Notably, allow users to bypass the "build & run" (which is almost useless as we often do quick template changes, manual file changes, passing data to/from a server - all taking much longer with build&run compared to just "refresh the browser") while still leveraging its quick-spin-up webserver server.

    In short, it would be beneficial to be able to find a way to spin-up Unity's web server and to point it to a build without having to use "build & run". Allowing us to fast iterate with multiple browsers and hot-modify the files the server uses while also testing a "gold standard" web-config for various compressions (GZip, Brotlit) - BEFORE having to deploy on our own webservers (local or not).
     
    De-Panther and xavier-ateo like this.
  4. xavier-ateo

    xavier-ateo

    Joined:
    Aug 8, 2018
    Posts:
    12
    I'd be very interested in Google Cloud Storage.
     
    De-Panther likes this.
  5. karmatha

    karmatha

    Joined:
    Aug 25, 2012
    Posts:
    50
    I'm using render.com and brotli compression. This is my render.yaml:

    Code (csharp):
    1. services:
    2. - type: web
    3.   name: <<site name>>
    4.   env: static
    5.   staticPublishPath: ./
    6.   headers:
    7.   - path: /**/*.br
    8.     name: Content-Encoding
    9.     value: br
    10.     - path: /**/*.js.br
    11.       name: Content-Encoding
    12.       value: br
    13.     - path: /**/*.js.br
    14.       name: Content-Type
    15.       value: text/javascript
    16.     - path: /**/*.wasm.br
    17.       name: Content-Encoding
    18.       value: br
    19.     - path: /**/*.wasm.br
    20.       name: Content-Type
    21.       value: application/wasm
    22.     - path: /**/*.wasm
    23.       name: Content-Type
    24.       value: application/wasm
    25.     - path: /**/*data.unityweb
    26.       name: Content-Encoding
    27.       value: br
    28.     - path: /**/*wasm.unityweb
    29.       name: Content-Encoding
    30.       value: br
    31.     - path: /**/*js.unityweb
    32.       name: Content-Encoding
    33.       value: br
    34.  
     
  6. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    210
    We use Amazon AWS S3 storage and our builds use brotli, which right now we have to manually set each file in the build folder appropriately in the AWS UI by clicking on a file and using their Actions -> Change Metadata command.

    Upload your brotli compressed Unity WebGL app to AWS S3 storage, and inside the build folder use the Change Metadata command on the following files...
    *.data.br - Set Content-Encoding to br and Content-Type to application/octet-stream
    *.framework.js.br - Set Content-Encoding to br and Content-Type to application/javascript
    *.loader.js - No need to change anything
    *.wasm.br - Set Content-Encoding to br and Content-Type to application/wasm

    Eventually, our team will have to build out an automated way of doing this, especially because we want to someday support WebGL 2.0 on devices that allow it, and make builds with different technologies enabled without bloating the download size by including every technology in one build. That would be a lot of waiting around and a lot of manually setting things by hand.
     
    KamilCSPS likes this.
  7. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    277
    How to Uploaded project management?
     
  8. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
    Thank you for all the replies. We have taken this information forward, and are looking to iterate on our hosting documentation for the future!
     
    DDmeow likes this.