unity-playmode-testing
БесплатноБез исполняемых скриптовНе проверенSupports Unity Play Mode control, input simulation, UI automation, and visual verification. Integrates test execution, screenshot/video capture, and console…
от akiojin★ 33 звезды на GitHubОб этом скилле
Unity PlayMode & Testing
A guide for Play Mode control, input simulation, UI automation, and visual verification.
Quick Start
1. Play Mode Control
// 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
// 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
// Capture Game View
mcp__unity-mcp-server__capture_screenshot({
captureMode: "game"
})
Play Mode Control
Start, Pause, Stop
// 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
// Get current state
mcp__unity-mcp-server__get_editor_state()
// Returns: { isPlaying: true/false, isPaused: true/false }
Wait for State
// 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
// 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 interval
})
// Key combo
mcp__unity-mcp-server__input_keyboard({
action: "combo",
keys: ["ctrl", "shift", "s"],
holdSeconds: 0.1
})
Mouse Input
// Move
mcp__unity-mcp-server__input_mouse({
action: "move",
x: 500,
y: 300,
absolute: true // Screen coordinates
})
// Click
mcp__unity-mcp-server__input_mouse({
action: "click",
x: 500,
y: 300,
button: "left", // left, right, middle
clickCount: 2 // Double-click
})
// Drag
mcp__unity-mcp-server__input_mouse({
action: "drag",
startX: 100,
startY: 100,
endX: 300,
endY: 300,
button: "left"
})
// Scroll
mcp__unity-mcp-server__input_mouse({
action: "scroll",
deltaY: -120 // Negative=down, Positive=up
})
// Button hold
mcp__unity-mcp-server__input_mouse({
action: "button",
buttonAction: "press",
button: "left",
holdSeconds: 1.0
})
Gamepad Input
// Button press
mcp__unity-mcp-server__input_gamepad({
action: "button",
button: "a", // a/cross, b/circle, x/square, y/triangle, start, select, etc.
buttonAction: "press"
})
// Analog stick
mcp__unity-mcp-server__input_gamepad({
action: "stick",
stick: "left",
x: 1.0, // -1.0 to 1.0
y: 0.5,
holdSeconds: 1.0
})
// Trigger
mcp__unity-mcp-server__input_gamepad({
action: "trigger",
trigger: "right",
value: 0.8, // 0.0 to 1.0
holdSeconds: 0.5
})
// D-Pad
mcp__unity-mcp-server__input_gamepad({
action: "dpad",
direction: "up", // up, down, left, right, none
holdSeconds: 0.3
})
Touch Input
// Tap
mcp__unity-mcp-server__input_touch({
action: "tap",
x: 500,
y: 300,
touchId: 0
})
// Swipe
mcp__unity-mcp-server__input_touch({
action: "swipe",
startX: 100,
startY: 500,
endX: 100,
endY: 200,
duration: 300 // ms
})
// Pinch (zoom)
mcp__unity-mcp-server__input_touch({
action: "pinch",
centerX: 400,
centerY: 300,
startDistance: 100,
endDistance: 200 // Zoom in
})
// Multi-touch
mcp__unity-mcp-server__input_touch({
action: "multi",
touches: [
{ x: 100, y: 200, phase: "began" },
{ x: 300, y: 200, phase: "began" }
]
})
Batch Input (Execute Multiple Actions Sequentially)
// Keyboard batch
mcp__unity-mcp-server__input_keyboard({
actions: [
{ action: "press", key: "w", holdSeconds: 1.0 },
{ action: "press", key: "space" },
{ action: "type", text: "test" }
]
})
// Mouse batch
mcp__unity-mcp-server__input_mouse({
actions: [
{ action: "move", x: 100, y: 100 },
{ action: "click", button: "left" },
{ action: "move", x: 200, y: 200 },
{ action: "click", button: "left" }
]
})
UI Automation
elementPath (uGUI / UI Toolkit / IMGUI)
The path (= elementPath) returned by find_ui_elements differs in format depending on the UI system.
- uGUI:
/Canvas/...(GameObject hierarchy path) - UI Toolkit:
uitk:<UIDocument GameObject path>#<VisualElement.name>- Example:
uitk:/UITK/UIDocument#UITK_Button
- Example:
- IMGUI: `
Установить unity-playmode-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobFAQ
Что делает скилл unity-playmode-testing?
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
Как установить скилл unity-playmode-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл unity-playmode-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic