Skip to content

Add case "Connection failed when running Play Mode tests" to the troubleshooting #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,17 @@ MCP Unityサーバーをデバッグするには、以下の方法を使用で
- メニュー項目が確認を必要とするかどうかを確認
- メニュー項目が現在のコンテキストで利用可能であることを確認

#### Play Modeテスト実行時に `Connection failed` エラー

`run_tests` ツールの実行が次のエラーを返します:
```
Error:
Connection failed: Unknown error
```

このエラーは、Play Modeに切り替わる際にドメインがリロードされるため、ブリッジ接続が失われることで発生します。
回避方法は、**Edit > Project Settings > Editor > "Enter Play Mode Settings"** で **Reload Domain** をオフにすることです。

## 貢献

貢献は大歓迎です!詳細については[貢献ガイド](CONTRIBUTING.md)をお読みください。
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,19 @@ Don't forget to shutdown the server with `Ctrl + C` before closing the terminal
- Verify that the menu item is available in the current context
</details>

<details>
<summary><span style="font-size: 1.1em; font-weight: bold;">Connection failed when running Play Mode tests</span></summary>

The `run_tests` tool returns the following response:
```
Error:
Connection failed: Unknown error
```

This error occurs because the bridge connection is lost when the domain reloads upon switching to Play Mode.
The workaround is to turn off **Reload Domain** in **Edit > Project Settings > Editor > "Enter Play Mode Settings"**.
</details>

## Support & Feedback

If you have any questions or need support, please open an [issue](https://github.com/CoderGamester/mcp-unity/issues) on this repository.
Expand Down
11 changes: 11 additions & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ MCP Unity 通过将 Unity `Library/PackedCache` 文件夹添加到您的工作
- 检查菜单项是否需要确认
- 验证菜单项在当前上下文中是否可用

#### 运行播放模式测试时连接失败

`run_tests` 工具返回以下响应:
```
Error:
Connection failed: Unknown error
```

发生此错误的原因是在切换到播放模式触发域重新加载时,桥接连接会丢失。
解决方法是在 **Edit > Project Settings > Editor > "Enter Play Mode Settings"** 中关闭 **Reload Domain**。

## 贡献

欢迎贡献!请阅读我们的[贡献指南](CONTRIBUTING.md)以获取更多信息。
Expand Down