runtime-query
Query runtime game state in Play Mode: find MonoBehaviours by type name and read their public fields and properties to verify game logic, check object states, and debug component values.
Instructions
Query runtime game state in Play Mode. Find MonoBehaviours by type name and read their public fields and properties. Useful for verifying game logic, checking object states, reading scores, debugging component values, etc. Works with any MonoBehaviour in the scene — no project-specific setup required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| typeName | Yes | Full or partial type name of the MonoBehaviour to find (e.g. 'PlayerController', 'GameManager', 'MyNamespace.EnemyAI'). | |
| fields | No | Specific field or property names to read (comma-separated). If empty, reads all public instance fields and properties. | |
| findAll | No | If true, find all instances. If false, find first instance only. | false |
| maxResults | No | Maximum number of instances to return when findAll=true (default: 10). | 10 |