CI/CD
Loom’s player-build hook runs automatically in CI the same way it runs from the Unity Editor. Your pipeline needs to provide the tools the hook expects.
CI requirements
Install or cache:
- Unity 6 with the modules your game needs
- Node.js 20+
- npm
- UI
node_modules
Run dependency installation before the Unity player build:
cd UI
npm ci Use npm ci in CI so dependency resolution is repeatable.
Build flow
A typical pipeline:
- Check out the repo.
- Install Unity.
- Install Node.js 20+.
- Run
npm ciin the UI directory. - Run the Unity player build in batchmode.
- Archive the player output.
During step 5, Loom runs the UI production build and copies the result into StreamingAssets/Loom.
Verifying the UI build
Add a CI check that fails if the player build did not include:
Assets/StreamingAssets/Loom/index.html Also keep the Unity log as a CI artifact. UI build failures are reported there with the npm output.
Common CI issues
- Node is installed but Unity cannot find it. Launch Unity from an environment where Node is on PATH.
npm cifails. Regenerate or commit the UI lockfile.- Editor works but CI player is blank. Check whether the UI build hook ran
and whether
StreamingAssets/Loomwas included.