uloop-compile
Compile Unity project via uloop CLI. Use when you need to: (1) Verify C# code compiles successfully after editing scripts, (2) Check for compile errors or warnings, (3) Validate script changes before running tests.
When & Why to Use This Skill
The uloop-compile skill provides a powerful interface for compiling Unity projects via the uloop CLI. It is designed to streamline the game development workflow by allowing developers and AI agents to verify C# code integrity, detect compilation errors or warnings, and validate script changes instantly. By automating the build check process, it ensures that code is functional before moving to the testing or deployment phase, significantly reducing manual debugging time within the Unity Editor.
Use Cases
- 1. Automated Code Validation: Quickly verify that C# script edits are syntactically correct and free of errors immediately after code generation or modification.
- 2. Pre-Testing Quality Gate: Use as a mandatory check to validate script changes before running complex unit tests or integration suites to save time.
- 3. Troubleshooting & Environment Recovery: Resolve Unity 'busy' states or stale lock files using the integrated fix utility and force full recompilation to ensure a clean environment.
- 4. AI-Agent Feedback Loop: Enable AI coding assistants to self-correct their Unity scripts by providing them with real-time error and warning counts from the compiler.
| name | uloop-compile |
|---|---|
| description | "Compile Unity project. Use when: verifying code compiles after edits, checking for compile errors, or when user asks to compile. Returns error/warning counts." |
uloop compile
Execute Unity project compilation.
Usage
uloop compile [--force-recompile]
Parameters
| Parameter | Type | Description |
|---|---|---|
--force-recompile |
boolean | Force full recompilation (triggers Domain Reload) |
Examples
# Check compilation
uloop compile
# Force full recompilation
uloop compile --force-recompile
Output
Returns JSON:
Success: booleanErrorCount: numberWarningCount: number
Troubleshooting
If CLI hangs or shows "Unity is busy" errors after compilation, stale lock files may be preventing connection. Run the following to clean them up:
uloop fix
This removes any leftover lock files (compiling.lock, domainreload.lock, serverstarting.lock) from the Unity project's Temp directory.