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.
分類: コード
| 名前 | 型 | 必須 | 既定値 | 説明 |
|---|---|---|---|---|
timeout_seconds |
integer | 60 |
Maximum time to wait for compilation (default: 60 seconds) | |
include_warnings |
boolean | false |
Include warnings in the result (default: false) |
呼び出しの例
Section titled “呼び出しの例”必須の引数だけを入れています。ほかは必要に応じて足してください。
{ "name": "compile_project", "arguments": {}}SuperSave モードでは
Section titled “SuperSave モードでは”Unity を NANORA_MCP_SUPERSAVE=1 で起動したときは、メタツール execute から {"tool": "compile_project", "args": { … }} の形で呼びます。SuperSave モードを参照。
Assets/NanoraUnityMCP/Editor/Tools/CompileProjectTool.cs(版 1.2.1)から生成しています。説明文はツール定義のまま(英語)です。AI クライアントは tools/list で同じスキーマを受け取ります。