Skip to content
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
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,38 @@ If something doesn't work, try asking the AI for help.

Launch Claude Code while the Unity Editor is open, and it will connect automatically.

## Updating

### Unity package

1. Open **Window > Package Manager**
2. Select **Playcaller** from the list
3. Click **Update**

### MCP server (PyPI)

```sh
uvx --upgrade playcaller
```

## Notes

### Run In Background

If the game does not progress after starting Play Mode via MCP, the project's "Run In Background" setting may be disabled. Enable it in **Edit > Project Settings > Player > Resolution and Presentation > Run In Background**, or set `Application.runInBackground = true` in your game code.

### HDR projects

In URP/HDRP projects with HDR enabled, `playcaller_screenshot` may hang due to a [known Unity issue](https://discussions.unity.com/t/screencapture-capturescreenshot-fails-when-hdr-is-enabled/896701). Use `playcaller_read_gameview_pixels` instead, which reads the GameView's internal buffer directly and works with HDR.

## MCP Tools

| Tool | Description |
|---|---|
| `playcaller_screenshot` | Capture a Game View screenshot |
| `playcaller_read_gameview_pixels` | Capture Game View by reading internal buffer (HDR compatible) |
| `playcaller_tap` | Tap at specified coordinates |
| `playcaller_multi_tap` | Execute multiple taps in sequence |
| `playcaller_drag` | Drag operation |
| `playcaller_flick` | Flick (quick swipe) operation |
| `playcaller_key_press` | Keyboard input |
Expand All @@ -75,3 +101,5 @@ Launch Claude Code while the Unity Editor is open, and it will connect automatic
| `playcaller_get_gameobject` | Get detailed info about a specific GameObject |
| `playcaller_execute_menu_item` | Execute a Unity Editor menu item |
| `playcaller_get_editor_state` | Get the current editor state |
| `playcaller_game_query` | Send a custom query to the running game |
| `playcaller_set_game_view_size` | Set the Game View resolution |
28 changes: 28 additions & 0 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,38 @@ claude mcp add playcaller -- uvx playcaller

Unity Editor を開いた状態で Claude Code を起動すると、自動的に接続されます。

## アップデート

### Unity パッケージ

1. **Window > Package Manager** を開く
2. リストから **Playcaller** を選択
3. **Update** をクリック

### MCP サーバー(PyPI)

```sh
uvx --upgrade playcaller
```

## 注意事項

### Run In Background

MCP経由でPlay Modeを開始した後、ゲームが進行しない場合は「Run In Background」が無効になっている可能性があります。**Edit > Project Settings > Player > Resolution and Presentation > Run In Background** を有効にするか、ゲームコード内で `Application.runInBackground = true` を設定してください。

### HDR プロジェクト

URP/HDRP で HDR が有効なプロジェクトでは、`playcaller_screenshot` が [Unity の既知の問題](https://discussions.unity.com/t/screencapture-capturescreenshot-fails-when-hdr-is-enabled/896701) によりハングすることがあります。代わりに `playcaller_read_gameview_pixels` を使用してください。GameView の内部バッファを直接読み取るため、HDR 環境でも動作します。

## MCP ツール一覧

| ツール名 | 説明 |
|---|---|
| `playcaller_screenshot` | Game View のスクリーンショットを取得 |
| `playcaller_read_gameview_pixels` | GameView の内部バッファを読み取ってキャプチャ(HDR対応) |
| `playcaller_tap` | 指定座標をタップ |
| `playcaller_multi_tap` | 複数のタップを連続実行 |
| `playcaller_drag` | ドラッグ操作 |
| `playcaller_flick` | フリック(クイックスワイプ)操作 |
| `playcaller_key_press` | キーボード入力 |
Expand All @@ -73,3 +99,5 @@ Unity Editor を開いた状態で Claude Code を起動すると、自動的に
| `playcaller_get_gameobject` | 特定の GameObject の詳細情報を取得 |
| `playcaller_execute_menu_item` | Unity Editor のメニューアイテムを実行 |
| `playcaller_get_editor_state` | エディタの現在の状態を取得 |
| `playcaller_game_query` | 実行中のゲームにカスタムクエリを送信 |
| `playcaller_set_game_view_size` | Game View の解像度を設定 |
Loading