WebGL build + optional npx serve smoke test + optional gh-pages
force-push, all from one PowerShell command on Windows.
The hardening (lockfile cleanup, Burst-AOT retry, process-tree kill, JSON build report, deploy worktree) lives in a separate cross-platform build orchestrator installed here as a git submodule:
unity-cross-platform-local-build-orchestratoratTools/.orchestrator/
Tools/Build/Build-Showcase.ps1 is a 12-line shim that forwards to the
submodule with this repo's title, batchmode method, and live URL.
git clone --recurse-submodules https://github.com/sinanata/unity-ui-document-design-system
cd unity-ui-document-design-system
copy Tools\Build\config.example.json Tools\Build\config.local.json
# Edit unity.windowsEditorPath if Unity isn't in C:\Program Files\Unity\Hub\Editor\6000.3.8f1\If you forgot --recurse-submodules, run git submodule update --init --recursive after the fact.
.\Tools\Build\Build-Showcase.ps1 # build only
.\Tools\Build\Build-Showcase.ps1 -Serve # build + serve at http://localhost:3000
.\Tools\Build\Build-Showcase.ps1 -Deploy # build + force-push to gh-pages (single-commit)
.\Tools\Build\Build-Showcase.ps1 -Deploy -Yes # CI-style (no prompts)
.\Tools\Build\Build-Showcase.ps1 -ClearCache # nuke Library/BurstCache + Bee + Temp before build
.\Tools\Build\Build-Showcase.ps1 -DryRun # print every command, execute nothingClose the Unity editor before running — batchmode and a live editor session fight for the same licence seat.
- Preflight — config + Unity exe exist, stale
Temp/UnityLockfileremoved. - Optional cache clear — wipes
Library/BurstCache,Library/Bee,Library/ScriptAssemblies,Temp. - WebGL build —
Unity -batchmode -executeMethod UIDocumentDesignSystem.BuildTools.BuildCli.BuildWebGL. Live phase progress from Unity'sDisplayProgressbar:log markers. JSON build report atTools/Build/output/report-*.json. - Optional
-Serve—npx serve build/WebGLon the configured port. - Optional
-Deploy— orphan worktree → copy artefacts → force-push togh-pages→ remove worktree. Branch stays at one commit so the public repo doesn't accumulate ~10 MB per deploy.
Hardening (defensive checks, Burst-AOT cache auto-retry, native-crash labelling, deploy worktree cleanup) — see the orchestrator's README for the full list.
After the first -Deploy push:
- https://github.com/sinanata/unity-ui-document-design-system → Settings → Pages.
- Source: Deploy from a branch.
- Branch:
gh-pages, folder:/ (root). - Save. URL: https://sinanata.github.io/unity-ui-document-design-system/
Tools/Build/
├── Build-Showcase.ps1 ← shim, forwards to orchestrator with our project values
├── config.example.json ← copy to config.local.json (gitignored)
├── README.md ← you are here
└── output/ ← Unity logs + JSON build reports (gitignored)
Tools/.orchestrator/ ← submodule — the heavy lifting
└── Tools/Build/
├── Build-WebGL.ps1 ← parameter-driven WebGL flow
└── Deploy-GhPages.ps1 ← single-commit gh-pages force-push via worktree
BuildCli.cs lives at Assets/Editor/BuildCli.cs (project-local: scene path + WebGL template name + namespace).
- Different Unity version — change
unity.windowsEditorPathinconfig.local.json. - Different output dir — change
paths.buildDir(absolute or repo-relative). - Different deploy target — change
deploy.remoteName/deploy.branchName. - Different orchestrator pin —
cd Tools/.orchestrator && git checkout <sha>and commit the submodule update.