一键导入
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.
// 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.
| name | uloop-compile |
| description | 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. |
Execute Unity project compilation.
uloop compile [--force-recompile]
| Parameter | Type | Description |
|---|---|---|
--force-recompile | boolean | Force full recompilation (triggers Domain Reload) |
# Check compilation
uloop compile
# Force full recompilation
uloop compile --force-recompile
Returns JSON:
Success: booleanErrorCount: numberWarningCount: numberIf 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.
Control Unity Editor play mode via uloop CLI. Use when you need to: (1) Start play mode for testing, (2) Stop play mode after testing, (3) Pause play mode for debugging.
Returns the Unity version. Use this tool to check Unity environment information.
Returns a simple 'Hello World' message. Use this tool for testing MCP connection.
Capture Unity EditorWindow and save as PNG image. Use when you need to: (1) Take a screenshot of Game View, Scene View, Console, Inspector, etc., (2) Capture visual state for debugging or verification, (3) Save editor output as an image file.
Clear Unity console logs via uloop CLI. Use when you need to: (1) Clear the console before running tests, (2) Start a fresh debugging session, (3) Clean up log output for better readability.
Execute C# code dynamically in Unity Editor via uloop CLI. Use for editor automation: (1) Prefab/material wiring and AddComponent operations, (2) Reference wiring with SerializedObject, (3) Scene/hierarchy edits and batch operations. NOT for file I/O or script authoring.