Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .agents/skills/uloop-control-play-mode/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ uloop control-play-mode [options]
|-----------|------|---------|-------------|
| `--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

Expand All @@ -31,7 +32,7 @@ Returns JSON with 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. 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.
- `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.
Expand All @@ -45,7 +46,8 @@ Returns JSON with the current play mode state:
- `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 failed save attempt during a `Play` request, and `Status` never attempts one.
- `Play` fails immediately with a `CONTROL_PLAY_MODE_UNSAVED_CHANGES` error when unsaved changes cannot be saved quietly — most commonly an Untitled scene, which has no path to save to. The error message lists exactly which scenes or prefab stages blocked it; save the Untitled scene to an explicit path (or discard the changes), then retry.
- `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.
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ main Editor) do not block each other.
"Play Mode Scenario - Scenario Setup Error". The CLI cannot see that failure and waits for Play
Mode until `--timeout-seconds` expires. Close the dialog in the Editor and read the Console
errors (`uloop get-logs --log-type Error`).
- Unsaved scenes are saved quietly before `Play`, as with the default configuration. An Untitled
scene still fails with `CONTROL_PLAY_MODE_UNSAVED_CHANGES`.
- `--unsaved-changes` applies as with the default configuration: `keep` (the default) starts
without saving, `save` writes unsaved scenes first (an Untitled scene then fails with
`CONTROL_PLAY_MODE_UNSAVED_CHANGES`), and `fail` stops if any exist.
8 changes: 5 additions & 3 deletions .claude/skills/uloop-control-play-mode/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ uloop control-play-mode [options]
|-----------|------|---------|-------------|
| `--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

Expand All @@ -31,7 +32,7 @@ Returns JSON with 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. 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.
- `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.
Expand All @@ -45,7 +46,8 @@ Returns JSON with the current play mode state:
- `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 failed save attempt during a `Play` request, and `Status` never attempts one.
- `Play` fails immediately with a `CONTROL_PLAY_MODE_UNSAVED_CHANGES` error when unsaved changes cannot be saved quietly — most commonly an Untitled scene, which has no path to save to. The error message lists exactly which scenes or prefab stages blocked it; save the Untitled scene to an explicit path (or discard the changes), then retry.
- `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.
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ main Editor) do not block each other.
"Play Mode Scenario - Scenario Setup Error". The CLI cannot see that failure and waits for Play
Mode until `--timeout-seconds` expires. Close the dialog in the Editor and read the Console
errors (`uloop get-logs --log-type Error`).
- Unsaved scenes are saved quietly before `Play`, as with the default configuration. An Untitled
scene still fails with `CONTROL_PLAY_MODE_UNSAVED_CHANGES`.
- `--unsaved-changes` applies as with the default configuration: `keep` (the default) starts
without saving, `save` writes unsaved scenes first (an Untitled scene then fails with
`CONTROL_PLAY_MODE_UNSAVED_CHANGES`), and `fail` stops if any exist.
Loading
Loading