uloop-compile
uloop compile
Execute Unity project compilation.
Usage
uloop compile [--force-recompile] [--wait-for-domain-reload]
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--force-recompile |
boolean | false |
Force full recompilation (triggers Domain Reload) |
--wait-for-domain-reload |
boolean | false |
Wait until Domain Reload completes before returning |
Global Options
| Option | Description |
|---|---|
--project-path <path> |
Optional. Use only when the target Unity project is not the current directory. |
Examples
# Check compilation
uloop compile
# Force full recompilation
uloop compile --force-recompile
# Force recompilation and wait for Domain Reload completion
uloop compile --force-recompile true --wait-for-domain-reload true
# Wait for Domain Reload completion even without force recompilation
uloop compile --force-recompile false --wait-for-domain-reload true
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.
More from hatayama/unity-cli-loop
uloop-control-play-mode
Control Unity Editor play mode (play/stop/pause). Use when you need to: (1) Start play mode to test game behavior, (2) Stop play mode to return to edit mode, (3) Pause play mode for frame-by-frame inspection.
3uloop-run-tests
Execute Unity Test Runner and get detailed results. Use when you need to: (1) Run EditMode or PlayMode unit tests, (2) Verify code changes pass all tests, (3) Diagnose test failures with error messages and stack traces. Auto-saves NUnit XML results on failure.
2uloop-launch
Launch Unity project with matching Editor version via uloop CLI. Use when you need to: (1) Open a Unity project with the correct Editor version, (2) Restart Unity to apply changes, (3) Switch build target when launching.
2uloop-record-input
Record keyboard and mouse input during PlayMode into a JSON file. Use when you need to: (1) Capture human gameplay input for later replay, (2) Record input sequences for E2E testing, (3) Save input for bug reproduction.
2find-orphaned-meta
Find and clean up orphaned .meta files in a Unity project. Use when you need to: (1) Find .meta files whose corresponding file or folder no longer exists, (2) Clean up Unity warnings about missing assets caused by stale .meta files, (3) Audit .meta hygiene after git operations like branch switches, merges, or file deletions. Also use proactively after deleting files or folders in a Unity project.
2uloop-get-hierarchy
Get Unity scene hierarchy as a structured tree. Use when you need to: (1) Inspect scene structure and parent-child relationships, (2) Explore GameObjects and their components, (3) Get hierarchy from a specific root path or selected objects. Returns the scene's GameObject tree.
2