en un clic
uloop-control-play-mode
// Control Unity Editor play mode (play/stop/pause). Use when you need to: (1) Start play mode to test game behavior, (2) Stop play mode to return to edit mode, (3) Pause play mode for frame-by-frame inspection.
// Control Unity Editor play mode (play/stop/pause). Use when you need to: (1) Start play mode to test game behavior, (2) Stop play mode to return to edit mode, (3) Pause play mode for frame-by-frame inspection.
Interact with a local Unity Editor through `unity-ai-cli`. Use when you need to: (1) Discover available Unity tools dynamically, (2) Execute `unity-ai-cli` tools with JSON arguments, (3) Expose the Unity Editor as an MCP server for AI clients.
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.
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.
Execute C# code dynamically in Unity Editor. Use when you need to: (1) Wire prefab/material references and AddComponent operations, (2) Edit SerializedObject properties and reference wiring, (3) Perform scene/hierarchy edits and batch operations. NOT for file I/O or script authoring.
Execute Unity Editor menu commands programmatically. Use when you need to: (1) Trigger menu commands like save, build, or refresh, (2) Automate editor actions via menu paths, (3) Run custom menu items defined in project scripts.
Find GameObjects in the active scene by various criteria. Use when you need to: (1) Search for objects by name, regex, or path, (2) Find objects with specific components, tags, or layers, (3) Get currently selected GameObjects in Unity Editor. Returns matching GameObjects with hierarchy paths and components.
| name | uloop-control-play-mode |
| description | Control Unity Editor play mode (play/stop/pause). Use when you need to: (1) Start play mode to test game behavior, (2) Stop play mode to return to edit mode, (3) Pause play mode for frame-by-frame inspection. |
Control Unity Editor play mode (play/stop/pause).
uloop control-play-mode [options]
| Parameter | Type | Default | Description |
|---|---|---|---|
--action | string | Play | Action to perform: Play, Stop, Pause |
| Option | Description |
|---|---|
--project-path <path> | Target a specific Unity project (mutually exclusive with --port) |
-p, --port <port> | Specify Unity TCP port directly (mutually exclusive with --project-path) |
# 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
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