Last active
April 7, 2021 11:19
-
-
Save unitycoder/b4f6b38b4809df87006534392a239dd3 to your computer and use it in GitHub Desktop.
Unity Compress WebGL Build Manually from Commandline (Brotli)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo off | |
REM add egg path | |
set PYTHONPATH=D:/Program Files/Unity2019_4/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Brotli/dist/Brotli-0.4.0-py2.7-win-amd64.egg | |
REM rename uncompressed data files (because brotli cannot overwrite same file that its packing) | |
move /Y "F:\Your\Project\Build\uncompressed.wasm.framework.unityweb" "F:\Your\Project\Build\uncompressed.wasm.framework.unityweb2" | |
move /Y "F:\Your\Project\Build\uncompressed.wasm.code.unityweb" "F:\Your\Project\Build\uncompressed.wasm.code.unityweb2" | |
move /Y "F:\Your\Project\Build\uncompressed.data.unityweb" "F:\Your\Project\Build\uncompressed.data.unityweb2" | |
REM compress | |
"D:/Program Files/Unity2019_4/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" "D:/Program Files/Unity2019_4/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Brotli\python\bro.py" -o "F:\Your\Project\Builds\uncompressed\Build\uncompressed.wasm.framework.unityweb2" -i "F:\Your\Project\Builds\\uncompressed\Build\uncompressed.wasm.framework.unityweb" --comment "UnityWeb Compressed Content (brotli)" | |
"D:/Program Files/Unity2019_4/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" "D:/Program Files/Unity2019_4/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Brotli\python\bro.py" -o "F:\Your\Project\Builds\\uncompressed\Build\uncompressed.wasm.code.unityweb2" -i "F:\Your\Project\Builds\\uncompressed\Build\uncompressed.wasm.code.unityweb" --comment "UnityWeb Compressed Content (brotli)" | |
"D:/Program Files/Unity2019_4/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" "D:/Program Files/Unity2019_4/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Brotli\python\bro.py" -o "F:\Your\Project\Builds\\uncompressed\Build\uncompressed.data.unityweb2" -i "F:\Your\Project\Builds\\uncompressed\Build\uncompressed.data.unityweb" --comment "UnityWeb Compressed Content (brotli)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment