Back to Skills

unity-playmode-testing

verified

Supports Unity Play Mode control, input simulation, UI automation, and visual verification. Integrates test execution, screenshot/video capture, and console log checking. Use when: starting Play Mode, input simulation, UI clicks, screenshots, video recording, test execution

View on GitHub

Marketplace

unity-mcp-server

akiojin/unity-mcp-server

Plugin

unity-mcp-server

development

Repository

akiojin/unity-mcp-server
8stars

.claude-plugin/plugins/unity-mcp-server/skills/unity-playmode-testing/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/akiojin/unity-mcp-server/blob/main/.claude-plugin/plugins/unity-mcp-server/skills/unity-playmode-testing/SKILL.md -a claude-code --skill unity-playmode-testing

Installation paths:

Claude
.claude/skills/unity-playmode-testing/
Powered by add-skill CLI

Instructions

# Unity PlayMode & Testing

A guide for Play Mode control, input simulation, UI automation, and visual verification.

## Quick Start

### 1. Play Mode Control

```javascript
// Start Play Mode
mcp__unity-mcp-server__play_game()

// Check state
mcp__unity-mcp-server__get_editor_state()

// Stop
mcp__unity-mcp-server__stop_game()
```

### 2. Input Simulation

```javascript
// Keyboard input
mcp__unity-mcp-server__input_keyboard({
  action: "press",
  key: "w",
  holdSeconds: 1.0
})

// Mouse click
mcp__unity-mcp-server__input_mouse({
  action: "click",
  x: 500,
  y: 300,
  button: "left"
})
```

### 3. Screenshot

```javascript
// Capture Game View
mcp__unity-mcp-server__capture_screenshot({
  captureMode: "game"
})
```

## Play Mode Control

### Start, Pause, Stop

```javascript
// Start Play Mode
mcp__unity-mcp-server__play_game()

// Pause/Resume (toggle)
mcp__unity-mcp-server__pause_game()

// Stop (return to Edit Mode)
mcp__unity-mcp-server__stop_game()
```

### Check State

```javascript
// Get current state
mcp__unity-mcp-server__get_editor_state()
// Returns: { isPlaying: true/false, isPaused: true/false }
```

### Wait for State

```javascript
// Wait until Play Mode starts
mcp__unity-mcp-server__playmode_wait_for_state({
  isPlaying: true,
  timeoutMs: 10000,  // 10 second timeout
  pollMs: 500        // Check every 500ms
})

// Wait until Edit Mode
mcp__unity-mcp-server__playmode_wait_for_state({
  isPlaying: false,
  timeoutMs: 5000
})
```

## Input Simulation

### Keyboard Input

```javascript
// Press key
mcp__unity-mcp-server__input_keyboard({
  action: "press",
  key: "space"
})

// Release key
mcp__unity-mcp-server__input_keyboard({
  action: "release",
  key: "space"
})

// Auto-release with holdSeconds
mcp__unity-mcp-server__input_keyboard({
  action: "press",
  key: "w",
  holdSeconds: 2.0  // Auto-release after 2 seconds
})

// Text input
mcp__unity-mcp-server__input_keyboard({
  action: "type",
  text: "Hello World",
  typingSpeed: 50  // 50ms i

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
16326 chars