uloop-control-play-mode
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseuloop control-play-mode
uloop control-play-mode
Control Unity Editor play mode (play/stop/pause).
控制Unity Editor播放模式(播放/停止/暂停)。
Usage
用法
bash
uloop control-play-mode [options]bash
uloop control-play-mode [options]Parameters
参数
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | | Action to perform: |
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 字符串 | | 要执行的操作: |
Global Options
全局选项
| Option | Description |
|---|---|
| Target a specific Unity project (mutually exclusive with |
| Specify Unity TCP port directly (mutually exclusive with |
| 选项 | 描述 |
|---|---|
| 指定目标Unity项目(与 |
| 直接指定Unity TCP端口(与 |
Examples
示例
bash
undefinedbash
undefinedStart play mode
启动播放模式
uloop control-play-mode --action Play
uloop control-play-mode --action Play
Stop play mode
停止播放模式
uloop control-play-mode --action Stop
uloop control-play-mode --action Stop
Pause play mode
暂停播放模式
uloop control-play-mode --action Pause
undefineduloop control-play-mode --action Pause
undefinedOutput
输出
Returns JSON with the current play mode state:
- : Whether Unity is currently in play mode
IsPlaying - : Whether play mode is paused
IsPaused - : Description of the action performed
Message
返回包含当前播放模式状态的JSON:
- : Unity当前是否处于播放模式
IsPlaying - : 播放模式是否已暂停
IsPaused - : 已执行操作的描述信息
Message
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
- 播放操作会在Unity Editor中启动游戏(也可从暂停状态恢复)
- 停止操作会退出播放模式并返回编辑模式
- 暂停操作会暂停游戏但保持在播放模式中
- 适用于自动化测试工作流