playtest
Automate playtesting in Unity by observing game state, simulating taps and UI clicks, capturing screenshots, and interacting with game objects to validate behavior.
Instructions
Autonomous playtesting: observe game state, simulate taps, click UI elements, capture screenshots, and interact with game objects during Unity play mode
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Screen X coordinate for tap action | |
| y | No | Screen Y coordinate for tap action | |
| args | No | Comma-separated method arguments for interact action | |
| col1 | No | Source column for swap_tiles action (0-based) | |
| col2 | No | Target column for swap_tiles action (0-based) | |
| name | No | UI element name for click_ui action (deep search across all canvases) | |
| row1 | No | Source row for swap_tiles action (0-based) | |
| row2 | No | Target row for swap_tiles action (0-based) | |
| text | No | Text to search for in wait_for 'text' condition | |
| end_x | No | End screen X for swipe action | |
| end_y | No | End screen Y for swipe action | |
| value | No | Value to set for Slider (float) or InputField (text) in click_ui | |
| width | No | Screenshot width in pixels (default 540) | |
| action | Yes | observe: full game state snapshot (scene, UI text, buttons, camera) | tap: simulate tap at screen coordinates (tries UI, Physics2D, Physics3D) | click_ui: click a UI element by name (Button, Toggle, Slider, InputField) | screenshot: capture camera view to PNG file | get_ui: list all active UI elements with types and state | wait_for: check if a condition is met (scene, text, object, playing, paused) | interact: call a method on a game object component via reflection | get_grid: read tile grid state (frequencies, positions, static status) for match-3 games | swap_tiles: swap two tiles by grid coordinates (col1,row1 <-> col2,row2) | swipe: simulate swipe gesture via screen coordinates (start_x,start_y -> end_x,end_y) | |
| height | No | Screenshot height in pixels (default 960) | |
| start_x | No | Start screen X for swipe action | |
| start_y | No | Start screen Y for swipe action | |
| condition | No | Condition type for wait_for: scene, text, object, playing, paused | |
| sceneName | No | Expected scene name for wait_for 'scene' condition | |
| methodName | No | Method to invoke for interact action | |
| objectName | No | GameObject name for wait_for 'object' condition | |
| objectPath | No | GameObject path for interact action (e.g. 'GameManagers') | |
| componentType | No | Component type name for interact (e.g. 'GameFlowManager') |