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
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
Recent Comments
- on Mesh Exploder (sources)
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by












[…] Source link title_words_as_hashtags […]