unity_get_compilation_errors
Retrieve C# compilation errors and warnings from the Unity Editor using CompilationPipeline to diagnose script issues independent of console log buffer.
Instructions
Get C# compilation errors and warnings from the Unity Editor. Uses CompilationPipeline directly — independent of the console log buffer. Not affected by console clear or Play Mode log flooding. Returns errors from the last compilation cycle. Use this instead of unity_console_log when diagnosing script compilation issues.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Max number of entries to retrieve (default: 50) | |
| severity | No | Filter: 'error', 'warning', or 'all' (default: 'all') | |
| port | No | Target Unity instance port for parallel-safe routing. Get this from unity_select_instance. When working with multiple Unity instances, ALWAYS include this parameter. |