7
2021
Compress WebGL build manually from command line (brotli)
Building brotli compressed webgl release can take hours (if you have large 3d models in the project..), and you cannot do anything with the project while unity is compressing it.
Solution:
Make (really fast) uncompressed builds from unity,
then compress the webgl data files manually from commandline!
(note that the example script below uses absolute paths for Unity 2019.4 and project folder)
Some notes:
– Script renames uncompressed data files first as *.unityweb2, because brotli cannot overwrite the same files that its compressing (optionally you could keep original file names, and create new compressed filenames, and modify the .json file to use new compressed files instead)
– need to add that brotli .egg path into pythonpath, otherwise bro.py cannot find it (optionally you could modify .bro file to include that path directly, see image below, modified script header to include path:
Related Posts
1 Comment + Add Comment
Leave a comment
Recent posts
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
- Check if point is inside polygon 2D (using line intersection)
- UnityHub: Enable Create Project Button (without having to select Cloud Organization)
- UI: Make Tooltip background fit Text content length
- Pong-Wars in Unity
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub)
- UnityHub: Add support for custom project title (instead of folder name) or use ProductName
- Testing Unity MUSE AI
[…] Source link title_words_as_hashtags […]