uloop-control-play-mode
Control Unity Editor play mode via uloop CLI. Use when you need to: (1) Start play mode for testing, (2) Stop play mode after testing, (3) Pause play mode for debugging.
When & Why to Use This Skill
The uloop-control-play-mode skill enables seamless management of the Unity Editor's execution state through the uloop CLI. It allows developers to programmatically start, stop, and pause play mode, significantly enhancing the efficiency of game development workflows, automated testing, and real-time debugging within the Unity environment.
Use Cases
- Automated Testing Workflows: Automatically trigger Unity's play mode to execute game logic tests and verify performance metrics without manual intervention.
- Enhanced Debugging: Pause the Unity Editor at critical moments to inspect scene hierarchies, component states, and variables during runtime.
- Development Pipeline Integration: Incorporate Unity state control into broader automation scripts or AI-driven development tasks to reduce context switching between the code editor and the Unity UI.
| name | uloop-control-play-mode |
|---|---|
| description | "Control Unity Editor play mode. Use when: starting/stopping/pausing play mode, testing game behavior, or when user asks to play or stop. Controls play/stop/pause of Unity Editor." |
uloop control-play-mode
Control Unity Editor play mode (play/stop/pause).
Usage
uloop control-play-mode [options]
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--action |
string | Play |
Action to perform: Play, Stop, Pause |
Examples
# Start play mode
uloop control-play-mode --action Play
# Stop play mode
uloop control-play-mode --action Stop
# Pause play mode
uloop control-play-mode --action Pause
Output
Returns JSON with the current play mode state:
IsPlaying: Whether Unity is currently in play modeIsPaused: Whether play mode is pausedMessage: Description of the action performed
Notes
- Play action starts the game in the Unity Editor (also resumes from pause)
- Stop action exits play mode and returns to edit mode
- Pause action pauses the game while remaining in play mode
- Useful for automated testing workflows