uloop-control-play-mode
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 |
Global Options
| Option | Description |
|---|---|
--project-path <path> |
Optional. Use only when the target Unity project is not the current directory. |
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
More from hatayama/unity-cli-loop
uloop-run-tests
Execute Unity Test Runner and get detailed results. Use when you need to: (1) Run EditMode or PlayMode unit tests, (2) Verify code changes pass all tests, (3) Diagnose test failures with error messages and stack traces. Auto-saves NUnit XML results on failure.
2uloop-compile
Compile Unity project and report errors/warnings. Use when you need to: (1) Verify code compiles after C# file edits, (2) Check for compile errors before testing, (3) Force full recompilation with Domain Reload. Returns error and warning counts.
2uloop-screenshot
Capture screenshots of Unity Editor windows as PNG files. Use when you need to: (1) Screenshot Game View, Scene View, Console, Inspector, or other windows, (2) Capture current visual state for debugging or documentation, (3) Save editor window appearance as image files.
2uloop-launch
Launch Unity project with matching Editor version via uloop CLI. Use when you need to: (1) Open a Unity project with the correct Editor version, (2) Restart Unity to apply changes, (3) Switch build target when launching.
2uloop-record-input
Record keyboard and mouse input during PlayMode into a JSON file. Use when you need to: (1) Capture human gameplay input for later replay, (2) Record input sequences for E2E testing, (3) Save input for bug reproduction.
2uloop-hello-world
Sample hello world tool via uloop CLI. Use when you need to test the MCP tool system or see an example of custom tool implementation.
2