К основному содержанию
скилл CX Codex

uloop-control-play-mode — скилл для Claude Code: управление Play Mode

Скилл uloop-control-play-mode для Claude Code управляет Play Mode в Unity: запускает и останавливает его, ставит на паузу, переключает кадр и показывает состояние. Проверяет поведение игры во время выполнения.

MIT 1 установок ★ 602 обновлён 2026-10-29

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add hatayama/unity-cli-loop --skill uloop-control-play-mode -a claude-code
Открыть на GitHub

Что делает uloop-control-play-mode

Скилл вызывает uloop control-play-mode и принимает действия Play, Stop, Pause, Step и Status. Status читает состояние без изменений; Step продвигает игру ровно на один кадр и оставляет её на паузе. Результат возвращается в JSON с состоянием Play Mode и сведениями о выполненном действии.

При запуске из Edit Mode параметр --unsaved-changes задаёт, что делать с несохранёнными изменениями сцен и Prefab Stage: оставить их в памяти, сохранить или прервать запуск. По умолчанию используется keep. Если нужен чистый запуск, сначала остановите текущую сессию: повторный Play уже запущенной игры её не сбрасывает. Для работы нужны Unity и доступная команда uloop.

Скилл также сообщает о компиляционных ошибках, которые мешают запуску, и может предупредить о состоянии редактора, влияющем на Play Mode. Step требует уже запущенного Play Mode; для медленного входа в режим можно увеличить --timeout-seconds.

Какие задачи решает

  • запустить Unity Play Mode для проверки поведения игры
  • поставить выполнение на паузу и продвинуть его на один кадр
  • узнать состояние Play Mode без изменения проекта
  • сбросить текущую сессию перед чистой проверкой

Примеры запросов агенту

  • Запусти Play Mode в Unity и сообщи, началась ли игровая сессия.
  • Поставь Play Mode на паузу, затем продвинь игру на один кадр.
  • Проверь состояние Play Mode, ничего не меняя в редакторе.

Как установить uloop-control-play-mode

1Через Skills CLI (Vercel)

npx skills add hatayama/unity-cli-loop --skill uloop-control-play-mode -a claude-code

2Вручную: положить файлы

~/.claude/skills/uloop-control-play-mode/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/uloop-control-play-mode/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об uloop-control-play-mode

Как установить uloop-control-play-mode в Claude Code?

Выполните npx skills add hatayama/unity-cli-loop --skill uloop-control-play-mode -a claude-code. Файл скилла находится по пути ~/.claude/skills/uloop-control-play-mode/SKILL.md.

Что делает uloop-control-play-mode?

Управляет Unity Play Mode через действия запуска, остановки, паузы и перехода на кадр. Действие Status показывает состояние без побочных эффектов.

Что произойдёт с несохранёнными сценами при запуске Play Mode?

Параметр --unsaved-changes позволяет оставить изменения в памяти, сохранить их или прервать запуск. Значение по умолчанию — keep; файлы сцен на диске при этом не перезаписываются.

Исходный текст

SKILL.md · MIT
---
name: uloop-control-play-mode
toolName: control-play-mode
description: "Control Unity Editor Play Mode. Use to Play (or Resume, its alias), Stop, Pause, or Step Play Mode, or query Status without side effects, for runtime behavior checks and frame inspection."
---

# uloop control-play-mode

Control Unity Editor play mode (play/stop/pause/step) or query its state without side effects (status).

## Usage

```bash
uloop control-play-mode [options]
```

## Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `--action` | string | `Play` | `Play` - start Play Mode, `Stop` - stop Play Mode, `Pause` - pause Play Mode, `Step` - advance one frame while paused, `Status` - report current state without changing anything, `Resume` - alias of Play in every state, including starting Play Mode when stopped |
| `--timeout-seconds` | integer | `180` | Maximum seconds to wait for the requested play mode state |
| `--unsaved-changes` | string | `keep` | How `Play` from Edit Mode handles unsaved Scene/Prefab Stage changes: `keep` enters Play Mode without saving (like the Editor's Play button); `save` writes them first; `fail` stops if any exist |

## Output

Returns JSON with the current play mode state:

- `IsPlaying`: Whether Unity is currently in play mode
- `IsPaused`: Whether play mode is paused
- `Changed`: Whether the requested action changed the current play mode state
- `WasAlreadyStopped`: Whether `Stop` was requested while Play Mode was already stopped
- `ResumedFromPause`: Whether `Play` resumed a paused Play Mode session instead of starting a new one
- `Message`: Description of the action performed
- `Warning` (string, optional): Set when the action carries a caveat. With `--unsaved-changes save` it starts by listing every Scene and Prefab Stage it saved. A fresh `Play` start always notes that the session started from Edit-time scene state; additionally, when active hot-reload patches or enabled pause points exist and Domain Reload is enabled, it reports how many of them the Play-entry domain reload will discard. Pause points enabled with `--persist` are counted separately: they are re-armed after the reload, and the warning points at `pause-point-status` for the re-arm result. `Status` also reports when Play Mode is running while the Unity Editor is unfocused, because progress may be throttled; run `uloop focus-window`, or use the `pause-point --await`/`--trigger` flow instead of polling for progress.
- `StoppedBy` (string, optional): Why Play Mode last stopped: `cli-control-play-mode`, `cli-compile-stop-setting`, `cli-run-tests-cancel`, `script-compilation`, or `unknown`. Present on `Stop` when Play Mode was already stopped, and on `Status` when Play Mode is not running. Omitted when this Editor session has no confirmed stop.
- `StoppedAt` (string, optional): UTC ISO 8601 timestamp of that stop. Omitted together with `StoppedBy` when no stop is recorded.
- `ActiveScenario` (string, optional): Name of the active non-default Play Mode configuration (for example a Multiplayer Play Mode scenario). Omitted when the default configuration is active.

## Notes

- Stop on an already-stopped Editor sets `Changed: false`, `WasAlreadyStopped: true`
- `Play` on an Editor that is already playing is a no-op: it sets `Changed: false` and leaves the current session (its accumulated state, spawned objects, progress) untouched instead of restarting it. If you need a clean state for verification, explicitly `Stop` then `Play` rather than relying on `Play` alone to reset anything.
- `Play` while Play Mode is paused resumes the same session: it sets `Changed: true`, `ResumedFromPause: true`, and `Message: "Play mode resumed"` — the session is not restarted.
- `Resume` is an alias of `Play` and behaves identically in every state, including starting Play Mode when stopped.
- `Step` advances exactly one frame and leaves PlayMode paused (the Editor's Next Frame button); it is independent of `Time.timeScale` and requires PlayMode to be running
- The command waits for the requested state before returning. Increase `--timeout-seconds` for projects with slow PlayMode entry.
- Before relying on PlayMode behavior as verification evidence, check `uloop get-logs --log-type Error` for pre-existing errors. An error already present when PlayMode starts can otherwise be mistaken for one caused by the action under test.
- `Status` reads the current state with no side effects: `Changed` is always `false`, no waiting, no scene saving, and it is never rejected by compile errors. It reports whether compile errors would currently block `Play` (`BlockedByCompileErrors` with the `CompileErrors` list), read from the last compile result without triggering a new compile. It does not predict unsaved-changes blocking: `BlockedByUnsavedChanges` describes a `Play` request that `--unsaved-changes` stopped, and `Status` never checks.
- `--unsaved-changes` applies only when `Play` enters Play Mode from Edit Mode; resuming a paused session never saves or checks. With the default `keep`, unsaved edits stay in memory: Unity restores them when Play Mode ends, and Scene files on disk are not rewritten.
- `Play` fails immediately with a `CONTROL_PLAY_MODE_UNSAVED_CHANGES` error when `fail` finds unsaved changes, or when `save` cannot save them — most commonly an Untitled scene, which has no path to save to. The error message lists exactly which scenes or prefab stages blocked it; use `keep`, or save the Untitled scene to an explicit path (or discard the changes), then retry.
- `Play` and `Stop` follow the active Play Mode configuration like the Editor's Play button: with a Multiplayer Play Mode scenario selected they start and stop its Virtual Players too. To find and command Virtual Players, read [references/multiplayer-play-mode.md](references/multiplayer-play-mode.md).
- `Play` from Edit mode triggers a domain reload (unless Enter Play Mode Options disable it), which discards all active hot-reload patches and every enabled pause point; pause points enabled with `--persist` are then re-armed from their saved enable request. The response `Warning` reports the counts being dropped and, separately, how many re-arm. Edits that were only hot-reloaded are not part of the compiled assemblies, so the new session runs the last compiled code — run `uloop compile` before `Play` to keep them, or re-apply `uloop hot-reload` after Play Mode starts.

© hatayama · MIT · hatayama/unity-cli-loop

Похожие скиллы

Каталог скиллов SKILL.md →
google-play fetcher-sh Скилл google-play для Claude Code ищет приложения в Google Play и получает сведения о них. Подключается для анализа отзывов, разрешений, похожих приложений и каталогов разработчиков. CX Codex +1 4 500установок play-billing-library-version-upgrade Google LLC Скилл play-billing-library-version-upgrade помогает перевести Android-проект с устаревшей Google Play Billing Library на актуальную стабильную версию. Разбирает исходный уровень API и планирует прямой или пошаговый переход. CX Codex +1 2 300установок play-policy-insights Google LLC Скилл play-policy-insights проверяет код Android-приложения на соответствие правилам Google Play до отправки в стор. Находит скрытый сбор данных и необоснованные системные разрешения. CX Codex +1 1 900установок page-play-builder aaron-he-zhu Скилл page-play-builder строит системы страниц под поисковый трафик через четыре сценария: программный SEO, внешние платформы, страницы сравнения и локальное продвижение. CX Codex +1 1 400установок lifecycle-play-advisor deanpeters Скилл lifecycle-play-advisor для Claude Code помогает продакт-менеджерам оценить спад продукта и выбрать стратегию: расширение, замену или закрытие. CX Codex +1 941установок play-developer-console rjyo Скилл для работы с Google Play Developer Console через локальный CLI play: метаданные, графика, треки, бандлы, отзывы и подписки. CX Codex +1 678установок

Из того же набора3

Спонсоры проекта

Компании, которые помогают держать аналитику открытой