compile_project
Trigger Unity script compilation and wait for completion (up to timeout_seconds). Returns success/failure with file, line, and message for each error (warnings only with include_warnings). Use this to verify script changes compile before entering Play Mode or running tests. A successful compile reloads the script domain, so the connection may drop before the response arrives. The result is kept across the reload: after the server is back, read it with get_compilation_errors instead of compiling again.
Category: Code
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
timeout_seconds |
integer | 60 |
Maximum time to wait for compilation (default: 60 seconds) | |
include_warnings |
boolean | false |
Include warnings in the result (default: false) |
Example call
Section titled “Example call”The arguments below are the required ones; add the optional ones you need.
{ "name": "compile_project", "arguments": {}}In SuperSave mode
Section titled “In SuperSave mode”When Unity runs with NANORA_MCP_SUPERSAVE=1, call it through the execute meta tool: {"tool": "compile_project", "args": { … }}. See SuperSave mode.
Source
Section titled “Source”Generated from Assets/NanoraUnityMCP/Editor/Tools/CompileProjectTool.cs (version 1.2.1). The client receives the same schema from tools/list.