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
-
PlayMode entry may complete on the next editor frame. If a PlayMode-dependent command reports "PlayMode is not active" immediately after
--action Play, wait briefly and retry.
More from hatayama/uloopmcp
uloop-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.
38uloop-find-game-objects
Use first when the user asks about the currently selected GameObject in the Unity Hierarchy. Inspect selected object details with `--search-mode Selected` before using `execute-dynamic-code`. Use when you need to: (1) Get details and component properties for selected GameObject(s), (2) Search for objects by name, regex, or path, (3) Find objects with specific components, tags, or layers. Use get-hierarchy when the child tree under the selection is needed. Returns hierarchy paths, active state, tags, layers, and components (or writes to a file when multiple GameObjects are selected).
37uloop-unity-search
Search Unity project assets using Unity Search engine. Use when you need to: (1) Find scenes, prefabs, scripts, materials, or other assets, (2) Filter assets by file extension or type, (3) Search with Unity Search query syntax and specific providers. Returns asset paths and metadata.
36uloop-clear-console
Clear all Unity Console log entries. Use when you need to: (1) Clear console before running tests or compilation, (2) Start a fresh debugging session, (3) Remove noisy logs to isolate specific output.
36uloop-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. Single-flight only — never run multiple `uloop run-tests` in parallel.
35uloop-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.
35