uloop-control-play-mode
通过 uloop CLI 控制 Unity 编辑器的播放模式。用于:1)启动播放模式进行测试,2)测试后停止播放模式,3)暂停播放模式进行调试。
📖 中文导读:通过 uloop CLI 控制 Unity 编辑器的播放模式。用于:1)启动播放模式进行测试,2)测试后停止播放模式,3)暂停播放模式进行调试。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
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