Skip to content

Commit 59e2891

Browse files
committed
Fix READMEs
1 parent 6b24edf commit 59e2891

File tree

3 files changed

+117
-72
lines changed

3 files changed

+117
-72
lines changed

README-ja.md

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -213,35 +213,50 @@ MCP Unityサーバーを起動するには2つの方法があります:
213213

214214
## オプション: タイムアウト設定
215215

216-
### WebSocketタイムアウト
217-
218216
デフォルトでは、MCPサーバーとWebSocket間のタイムアウトは 10 秒です。
219-
MCP構成ファイルで、次のように環境変数 `UNITY_REQUEST_TIMEOUT` として指定できます
217+
お使いのOSに応じて変更できます
220218

221-
```json
222-
{
223-
"mcpServers": {
224-
"mcp-unity": {
225-
"command": "node",
226-
"args": [
227-
"ABSOLUTE/PATH/TO/mcp-unity/Server/build/index.js"
228-
],
229-
"env": {
230-
"UNITY_PORT": "8090",
231-
"UNITY_REQUEST_TIMEOUT": "300"
232-
}
233-
}
234-
}
235-
}
236-
```
219+
<details>
220+
<summary><span style="font-size: 1.1em; font-weight: bold;">Option 1: Windows OS</span></summary>
237221

238-
> [!TIP]
239-
> AIコーディングIDE(Claude Desktop、Cursor IDE、Windsurf IDE など)とMCPサーバー間のタイムアウトは、AIコーディングIDEによって異なります。
222+
1. Unityエディターを開きます
223+
2. **Tools > MCP Unity > Server Window** に移動します
224+
3. **Request Timeout (seconds)** の値を希望のタイムアウト秒数に変更します
225+
4. Unityはシステム環境変数UNITY_REQUEST_TIMEOUTに新しいタイムアウト値を設定します
226+
5. Node.jsサーバーを再起動します
227+
6. **Start Server** をもう一度クリックして、UnityエディターのWebソケットをNode.js MCPサーバーに再接続します
240228

241-
### テスト実行タイムアウト
229+
</details>
230+
231+
<details>
232+
<summary><span style="font-size: 1.1em; font-weight: bold;">Option 2: Windows以外のOS</span></summary>
233+
234+
Windows 以外の OS の場合は、次の 2 か所で設定する必要があります。
235+
236+
### エディター内プロセスのタイムアウト
237+
238+
1. Unityエディターを開きます
239+
2. **Tools > MCP Unity > Server Window** に移動します
240+
3. **Request Timeout (seconds)** の値を希望のタイムアウト秒数に変更します
241+
242+
### WebSocketのタイムアウト
242243

243-
デフォルトでは、Unityエディター側の `run_tests` ツールの実行タイムアウトは 60 秒です。
244-
**Tools > MCP Unity > Server Window****Test Timeout (seconds)** で指定できます。
244+
1. ターミナルで UNITY_REQUEST_TIMEOUT 環境変数を設定します
245+
- Powershell
246+
```powershell
247+
$env:UNITY_REQUEST_TIMEOUT = "300"
248+
```
249+
- Command Prompt/Terminal
250+
```cmd
251+
set UNITY_REQUEST_TIMEOUT=300
252+
```
253+
2. Node.jsサーバーを再起動します
254+
3. **Start Server** をもう一度クリックして、UnityエディターのWebソケットをNode.js MCPサーバーに再接続します
255+
256+
</details>
257+
258+
> [!TIP]
259+
> AIコーディングIDE(Claude Desktop、Cursor IDE、Windsurf IDE など)とMCPサーバー間のタイムアウト設定は、IDEによって異なります。
245260
246261
## <a name="debug-server"></a>サーバーのデバッグ
247262

README.md

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -238,35 +238,50 @@ By default, the WebSocket server runs on port 8090. You can change this port in
238238

239239
## Optional: Set Timeout
240240

241-
### WebSocket Timeout
242-
243241
By default, the timeout between the MCP server and the WebSocket is 10 seconds.
244-
You can specify it as an environment variable `UNITY_REQUEST_TIMEOUT` in your MCP configuration file as follows:
242+
You can change depending on the OS you are using:
245243

246-
```json
247-
{
248-
"mcpServers": {
249-
"mcp-unity": {
250-
"command": "node",
251-
"args": [
252-
"ABSOLUTE/PATH/TO/mcp-unity/Server/build/index.js"
253-
],
254-
"env": {
255-
"UNITY_PORT": "8090",
256-
"UNITY_REQUEST_TIMEOUT": "300"
257-
}
258-
}
259-
}
260-
}
261-
```
244+
<details>
245+
<summary><span style="font-size: 1.1em; font-weight: bold;">Option 1: Windows OS</span></summary>
262246

263-
> [!TIP]
264-
> The timeout between your AI Coding IDE (e.g., Claude Desktop, Cursor IDE, Windsurf IDE) and the MCP Server depends on the AI coding IDE.
247+
1. Open the Unity Editor
248+
2. Navigate to Tools > MCP Unity > Server Window
249+
3. Change the "Request Timeout (seconds)" value to your desired timeout seconds
250+
4. Unity will setup the system environment variable UNITY_REQUEST_TIMEOUT to the new timeout value
251+
5. Restart the Node.js server
252+
6. Click again on "Start Server" to reconnect the Unity Editor web socket to the Node.js MCP Server
253+
254+
</details>
255+
256+
<details>
257+
<summary><span style="font-size: 1.1em; font-weight: bold;">Option 2: Non-Windows OS</span></summary>
265258

266-
### Test Execution Timeout
259+
For non-Windows OS, you need to configure two places:
267260

268-
By default, the execution timeout for the `run_tests` tool in the Unity editor is 60 seconds.
269-
You can specify it in **Test Timeout (seconds)** in the **Tools > MCP Unity > Server Window**.
261+
### In Editor Process Timeout
262+
263+
1. Open the Unity Editor
264+
2. Navigate to Tools > MCP Unity > Server Window
265+
3. Change the "Request Timeout (seconds)" value to your desired timeout seconds
266+
267+
### WebSocket Timeout
268+
269+
1. Set the UNITY_REQUEST_TIMEOUT environment variable in the terminal
270+
- Powershell
271+
```powershell
272+
$env:UNITY_REQUEST_TIMEOUT = "300"
273+
```
274+
- Command Prompt/Terminal
275+
```cmd
276+
set UNITY_REQUEST_TIMEOUT=300
277+
```
278+
2. Restart the Node.js server
279+
3. Click again on "Start Server" to reconnect the Unity Editor web socket to the Node.js MCP Server
280+
281+
</details>
282+
283+
> [!TIP]
284+
> The timeout between your AI Coding IDE (e.g., Claude Desktop, Cursor IDE, Windsurf IDE) and the MCP Server depends on the IDE.
270285
271286
## <a name="debug-server"></a>Debugging the Server
272287

README_zh-CN.md

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -215,35 +215,50 @@ MCP Unity 通过将 Unity `Library/PackedCache` 文件夹添加到您的工作
215215

216216
## 可选:设置超时
217217

218-
### WebSocket 超时
219-
220218
默认情况下,MCP 服务器与 WebSocket 之间的超时时间为 10 秒。
221-
您可以在 MCP 配置文件中将其指定为环境变量 `UNITY_REQUEST_TIMEOUT`,如下所示
219+
您可以根据所使用的操作系统进行更改
222220

223-
```json
224-
{
225-
"mcpServers": {
226-
"mcp-unity": {
227-
"command": "node",
228-
"args": [
229-
"ABSOLUTE/PATH/TO/mcp-unity/Server/build/index.js"
230-
],
231-
"env": {
232-
"UNITY_PORT": "8090",
233-
"UNITY_REQUEST_TIMEOUT": "300"
234-
}
235-
}
236-
}
237-
}
238-
```
221+
<details>
222+
<summary><span style="font-size: 1.1em; font-weight: bold;">Option 1: Windows OS</span></summary>
239223

240-
> [!TIP]
241-
> 您的 AI 编码 IDE(例如,Claude Desktop、Cursor IDE、Windsurf IDE)和 MCP 服务器之间的超时取决于 AI 编码 IDE。
224+
1. 打开 Unity 编辑器
225+
2. 导航至 Tools > MCP Unity > Server Window
226+
3. 将 "Request Timeout (seconds)" 值更改为所需的超时秒数
227+
4. Unity 会将系统环境变量 UNITY_REQUEST_TIMEOUT 设置为新的超时值
228+
5. 重启 Node.js 服务器
229+
6. 再次点击“启动服务器”,将 Unity 编辑器 Web 套接字重新连接到 Node.js MCP 服务器
242230

243-
### 测试执行超时
231+
</details>
232+
233+
<details>
234+
<summary><span style="font-size: 1.1em; font-weight: bold;">Option 2: 非Windows操作系统</span></summary>
235+
236+
对于非Windows操作系统,需要配置两个地方:
244237

245-
默认情况下,Unity 编辑器中 `run_tests` 工具的执行超时时间为 60 秒。
246-
您可以在 **Tools > MCP Unity > Server Window** 中的 **Test Timeout (seconds)** 中指定它。
238+
### 编辑器进程超时
239+
240+
1. 打开 Unity 编辑器
241+
2. 导航至 Tools > MCP Unity > Server Window
242+
3. 将 "Request Timeout (seconds)" 值更改为所需的超时秒数
243+
244+
### WebSocket 超时
245+
246+
1. 在终端中设置 UNITY_REQUEST_TIMEOUT 环境变量
247+
- Powershell
248+
```powershell
249+
$env:UNITY_REQUEST_TIMEOUT = "300"
250+
```
251+
- Command Prompt/Terminal
252+
```cmd
253+
set UNITY_REQUEST_TIMEOUT=300
254+
```
255+
2. 重启 Node.js 服务器
256+
3. 再次点击“启动服务器”,将 Unity 编辑器 Web 套接字重新连接到 Node.js MCP 服务器
257+
258+
</details>
259+
260+
> [!TIP]
261+
> 您的 AI 编码 IDE(例如,Claude Desktop、Cursor IDE、Windsurf IDE)和 MCP 服务器之间的超时取决于 IDE。
247262
248263
## <a name="debug-server"></a>调试服务器
249264

0 commit comments

Comments
 (0)