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
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- 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)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
[…] Source link title_words_as_hashtags […]