unity_get_compilation_errors
Retrieve C# compilation errors and warnings directly from Unity's CompilationPipeline. Bypasses console log buffer to ensure accurate results unaffected by clears or Play Mode log flooding. Specify count, severity filter, and target Unity instance port.
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. |