Testing Unity's WebGL capabilities for different versions and platforms
Version | Size | Link |
---|---|---|
2019.3.0f6 | 3.28 MB | https://deml.io/experiments/unity-webgl/2019.3.0f6/ |
2020.1.0f1 | 2.86 MB | https://deml.io/experiments/unity-webgl/2020.1.0f1/ |
2020.2.0f1 | 2.82 MB | https://deml.io/experiments/unity-webgl/2020.2.0f1/ |
2020.2.0f1 URP | 5.27 MB | https://deml.io/experiments/unity-webgl/2020.2.0f1-urp/ |
2020.3.0f1 | 2.83 MB | https://deml.io/experiments/unity-webgl/2020.3.0f1/ |
2020.3.0f1 URP | 5.27 MB | https://deml.io/experiments/unity-webgl/2020.3.0f1-urp/ |
2021.1.0f1 | 2.85 MB | https://deml.io/experiments/unity-webgl/2021.1.0f1/ |
2021.1.0f1 URP | 5.47 MB | https://deml.io/experiments/unity-webgl/2021.1.0f1-urp/ |
Platform | Chrome | Firefox | Edge | Safari | Internet Explorer |
---|---|---|---|---|---|
Windows 10 | ✔️ | ✔️ | ✔️ | ➖ | ❌ |
Linux | ✔️ | ✔️ | ✔️ | ➖ | ➖ |
Mac | ✔️ | ✔️ | ✔️ | ✔️ | ➖ |
Android | ✔️ | ✔️ | ✔️ | ➖ | ➖ |
iOS | ✔️ | ✔️ | ✔️ | ✔️ | ➖ |
✔️ : Supported |
- Physics
- GPU Instancing for materials
- Shadows
- Brotli Compression
- The server is configured to support wasm streaming and brotli compression, see .htaccess 2020 .htaccess 2019
- The builds are optimized for speed. When switching to Size and changing the C++ config to Master, the size decreases by ~40 KB ( Example: 2021.1.0f1 Min Size (2.45MB) ).
- In order to get rid of the warning on android/iOS it is removed in a post process build step (File)
- You might need to reload the page on android/iOS when running the first time
- This is a very small example. When building larger WebGL applications, you might run into problems with memory or compile errors. I recommend to build from the start and very often, to catch the changes that create those problems.
- If you want to have the smallest file size possible, take a look at Project Tiny or web-specific libraries like Three.js.
- URP adds additional ~2.5 MB file size compared to the builtin render pipeline.
- Removing the default skybox will save ~30kb.
- In general the performance for URP seems to be better compared to builtin, but it has a larger build size.
- Internet Explorer does not work for Unity WebGL builds, since it does not support wasm.
- Previous versions of Firefox on Android had some performance problems, they seemed to have fixed those. In general performance on mobile is by far not as good as a native app build, but should be enough for simple games.
For further information check out the forum-thread.