From 00319dfec3ae6ba5ad7f0e8e593a0360302027bd Mon Sep 17 00:00:00 2001 From: "pre-shared-workflows-auth[bot]" <168739156+pre-shared-workflows-auth[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 19:21:25 +0000 Subject: [PATCH] chore: publish 1 skill (unity-pipeline) --- skills/using-unity/SKILL.md | 2 +- .../references/unity-pipeline/SECURITY.md | 6 +- .../unity-pipeline/unity-pipeline.md | 261 +++++++++--------- 3 files changed, 127 insertions(+), 142 deletions(-) diff --git a/skills/using-unity/SKILL.md b/skills/using-unity/SKILL.md index 05e43c0..1abd3e7 100644 --- a/skills/using-unity/SKILL.md +++ b/skills/using-unity/SKILL.md @@ -55,6 +55,6 @@ A skill may tell you to use, load or check for another skill by name, for exampl - **ui-uitk**: Understands, edits, and generates Unity UI Toolkit UXML and USS with flex layouts. Use for requests involving UI Toolkit, UIElements, UIDocument, PanelSettings, custom elements, or UI runtime binding. File: `references/ui-uitk/ui-uitk.md` - **unity-cli**: Controls Unity Editors and projects from the command line, including a running Editor. Make sure to use this skill when the user asks to install or manage Editors, licenses, or projects, set up version control, build, test, edit scenes, run C#, look up the scripting API or manual for the project's Unity version, or run any unity command. File: `references/unity-cli/unity-cli.md` - **unity-package-management**: Adds, removes, upgrades, and finds Unity (UPM) packages from outside the Editor. Use for package installs, checking package IDs and versions, or choosing which packages a game needs. File: `references/unity-package-management/unity-package-management.md` -- **unity-pipeline**: Control a Unity Editor or Player via the unity-pipeline package. Compile, run tests, eval, method-reload code, enter Play Mode, capture screenshots. File: `references/unity-pipeline/unity-pipeline.md` +- **unity-pipeline**: Controls a Unity Editor or dev Player through the com.unity.pipeline package to compile, run tests, evaluate C#, method-reload code, enter Play Mode and capture screenshots. Make sure to use this skill when the user asks to drive, test, debug or inspect a running Unity Editor or Player from the command line. File: `references/unity-pipeline/unity-pipeline.md` - **urp-postprocessing**: Sets up, configures, and debugs URP post-processing with the Volume framework. Use for bloom, tonemapping, color adjustments, depth of field, vignette, or other Volume overrides. File: `references/urp-postprocessing/urp-postprocessing.md` - **validate-urp-render-graph-renderer-feature**: Reviews a Unity 6 URP ScriptableRendererFeature that uses the Render Graph API, checking resource wiring, material binding, execution structure, and best practices. Use to validate a renderer feature. File: `references/validate-urp-render-graph-renderer-feature/validate-urp-render-graph-renderer-feature.md` diff --git a/skills/using-unity/references/unity-pipeline/SECURITY.md b/skills/using-unity/references/unity-pipeline/SECURITY.md index ad74dc0..40e6817 100644 --- a/skills/using-unity/references/unity-pipeline/SECURITY.md +++ b/skills/using-unity/references/unity-pipeline/SECURITY.md @@ -1,17 +1,17 @@ # Security notes: unity-pipeline -This skill has the agent run C# inside a Unity Editor or development Player the user already has running, through `unity command script eval`, `script eval_file`, `script run` and `script.methodreload reload`. Automated skill scanners flag that as a powerful capability. It is intentional, and it is limited by the safeguards below. +This skill has the agent run C# inside a Unity Editor or development Player the user already has running, through `unity command script eval`, `script run` and `script.methodreload reload`. Automated skill scanners flag that as a powerful capability. It is intentional, and it is limited by the safeguards below. ## Accepted risks | Risk | Capability | Why it is accepted | |---|---|---| -| `SEC_POWER_CAP` | Runs C# in the user's running Editor or development Player through `unity command script eval`, `script eval_file`, `script run` and `script.methodreload reload` | It only reaches an instance the user started, with the Pipeline package they installed, so it grants nothing they couldn't do in that Editor themselves. No code fetched from a remote source is run. The skill steers ad-hoc code into versioned project files run with `script run`, and keeps `script eval` for one-liners. | +| `SEC_POWER_CAP` | Runs C# in the user's running Editor or development Player through `unity command script eval`, `script run` and `script.methodreload reload` | It only reaches an instance the user started, with the Pipeline package they installed, so it grants nothing they couldn't do in that Editor themselves. No code fetched from a remote source is run. The skill steers ad-hoc code into versioned project files run with `script run`, and keeps `script eval` for one-liners. | ## Mitigations - **Only the user's own instances.** Commands go to an Editor or development Player the user is running with the Pipeline package installed. Runtime commands need a development build; release Players have no Pipeline server. - **No remote code.** The agent runs C# it writes for the user's task. Nothing downloaded from outside is executed. - **Code lives in reviewable files.** Bulk work goes into scripts on disk run with `script run`, so the user can read and version what ran. `script eval` is reserved for short one-liners. -- **Compile-only check.** `script run --dry_run true` reports diagnostics without loading or running anything. +- **Compile-only check.** `script run --dry-run` reports diagnostics without loading or running anything. - **Named commands first.** When a dedicated `unity command` covers a step, the skill uses it instead of running C#. diff --git a/skills/using-unity/references/unity-pipeline/unity-pipeline.md b/skills/using-unity/references/unity-pipeline/unity-pipeline.md index f2ab1d4..9ca4d64 100644 --- a/skills/using-unity/references/unity-pipeline/unity-pipeline.md +++ b/skills/using-unity/references/unity-pipeline/unity-pipeline.md @@ -1,6 +1,6 @@ --- name: unity-pipeline -description: Control a Unity Editor or Player via the unity-pipeline package. Compile, run tests, eval, method-reload code, enter Play Mode, capture screenshots. +description: Controls a Unity Editor or dev Player through the com.unity.pipeline package to compile, run tests, evaluate C#, method-reload code, enter Play Mode and capture screenshots. Make sure to use this skill when the user asks to drive, test, debug or inspect a running Unity Editor or Player from the command line. --- # Unity Pipeline (agent control) @@ -10,11 +10,36 @@ groups, `unity command ` one group's commands, and `--query ` filte description or tag. Two servers exist: **Editor** (`7800-7849`, auto-starts with the editor) and **Runtime** (`7900-7949`, only in a dev Player build). +## Targeting the Editor + +**Always pass `--project-path `, or run `unity` from inside the project folder.** A +project folder holds exactly one Editor, so this is unambiguous, needs no other flag, and reads the +Editor's port and token straight from the project, with no process scan. An MPPM clone is its own +project: `--project-path /Library/VP/`. + +Don't use `--port`, `--pid` or `--instance` unless the user asks for them. Without +`--project-path` they search every running Editor: on Unity 6 (6000.x) that is a scan of every +process, a second or more on each call; only Unity 7 Editors answer it without a scan. The CLI +warns on stderr when a call had to scan. + +## Before you start + +- If the package is not installed, install it first ([1. Install & verify](#1-install--verify)). +- Before any other workflow or diagnosis, open and read the [Topic map](#topic-map) pages for your + task, and name the files you read. Your training knowledge about Unity and this package may be + out of date, incorrect, or for the wrong version. +- Read only `.md` files in the installed package's `Documentation~` folder, or the live pages for + its version, as the [Topic map](#topic-map) describes. +- Create a restore point you can roll back to if your changes fail, such as a git commit or stash. +- Do only what's asked. Don't change unrelated assets or files. Avoid long explanations. +- Never leave verification code in the user's script. Never build logging or detection they didn't + ask for. + ## 1. Install & verify ```bash unity pipeline install # install into current project (or --project-path) -unity pipeline list # confirm the editor instance + server are reachable +unity pipeline editors # list Editor instances and their Pipeline status unity status --until-ready # wait until the editor server is ready unity command editor status # confirm the editor server answers ``` @@ -28,8 +53,8 @@ persists, ask the user to switch to the Unity Editor window, then re-run `unity This is the core agent workflow: keep the editor alive, change code, recompile, test. ```bash -# 1. Keep the editor ticking even when unfocused/minimized. REQUIRED before headless work — -# Unity otherwise throttles or stalls update/compile when it isn't the active app. +# 1. Keep the editor ticking when unfocused or minimized; otherwise Unity throttles update and +# compile. It is on by default, but a session that set it explicitly keeps its own value. unity command editor set_auto_tick --enabled true # 2. Edit C# source files on disk normally. @@ -38,7 +63,9 @@ unity command editor set_auto_tick --enabled true unity command script recompile unity command script recompile_status # repeat until "completed" or "up_to_date" # Tolerate connection errors while the domain reload is in flight — that is expected. -# If script recompile_status reports failed=true, read its "errors" array and fix before testing. +# If script recompile_status reports failed=true, read its "errors" array. Fix errors in code +# you wrote; for errors in the user's code, report them and ask before editing. Tests run on a +# failed compile use the last assemblies that built, so their results don't cover the change. # 4. (Optional) List available tests without running them. unity command test list --mode editor # mode: all | editor | playmode @@ -47,9 +74,11 @@ unity command test list --mode editor # mode: all | editor | playmode unity command test run --mode editor --filter MyFixture.MyTest ``` -`filter-type`: `testName` | `assembly` | `category`. For long runs use `--async-tests true` and -poll `unity command test status` (abort with `test cancel`). When a selected test *fails*, `test run` -may return an opaque result: re-run a narrower `--filter`, or inspect the Test Runner / logs. +`test run` modes: `editor` (default) | `playmode` | `all` (both need `--async-tests true`). `filter-type`: +`testName` | `assembly` | `category`. Use `--async-tests true` and poll `unity command test status` for long +runs and any run that may reload the domain (a reload drops a synchronous run's request; abort with `test cancel`). +A synchronous run returns one record per test, failures included, with its message and stack trace. For an +async run, `unity command test status --detail failures` returns only the failed tests' results. **Reading exit codes.** They separate "rewrite the invocation" from "the Editor failed", which is the distinction this loop depends on: @@ -57,37 +86,37 @@ is the distinction this loop depends on: | Exit | Meaning | What to do | |------|---------|------------| | `2` | Bad arguments — a misspelled flag, a wrong type, too many positionals. Nothing ran. | Fix the command line and retry. The error names the problem and often suggests the right flag. | -| `6` | The command ran and failed, or no Editor could be reached. | Read the error. If it says no Pipeline instance was found, the Editor isn't reachable: wait with `unity status --until-ready` (or check `unity pipeline list` for Safe Mode), then retry. Otherwise retrying the same invocation will not help. | +| `6` | The command ran and failed, or no Editor could be reached. | Read the error. If it says no Pipeline instance was found, the Editor isn't reachable: wait with `unity status --until-ready` (or check `unity pipeline editors` for Safe Mode), then retry. Otherwise retrying the same invocation will not help. | Do not retry an exit 2 unchanged, and do not rewrite a command line on an exit 6. ## 3. Runtime method reload -Change gameplay code in a **running** game with no domain reload. The game must be live: -enter Editor Play Mode (`unity command editor.playmode start`) or run a dev Player. The runtime Pipeline driver (enabled via Project Settings > Pipeline > Runtime) auto-discovers tagged methods on `Awake` (no manual -registration). Mono only — Editor Play Mode and Mono desktop dev builds, not IL2CPP. The token -is auto-injected for local requests. - -### `script.methodreload reload` - -Edit the method body directly; no separate file, no boilerplate. - -1. **Before entering Play Mode**, tag the method `[MethodReload]` on the MonoBehaviour and recompile. - The reload hook is compiled into the method, so tagging it while the game runs has no effect: - exit Play Mode, recompile, and enter it again. +Change gameplay code in a **running** game with no domain reload. The game must be live: enter +Editor Play Mode (`unity command editor.playmode start`) or run a dev Player with the runtime +Pipeline driver enabled (Project Settings > Pipeline > Runtime). Two backends: + +- `script.methodreload reload` loads a compiled assembly: Editor Play Mode and Mono desktop dev + builds only. The reloaded body may touch only **public** members of its type. +- `script.methodreload reload_editor` and `reload_player` run the edited IL through an + interpreter, in the Editor or in connected dev Players, **including IL2CPP**. They accept a C# + subset, and `reload_player` needs the Editor running. + +1. **Before entering Play Mode**, tag the method `[MethodReload]` (`using Unity.Pipeline.MethodReload;`, + assembly `Unity.Pipeline.Attributes`, auto-referenced) and recompile. The reload hook is + compiled into the method, so tagging it while the game runs has no effect: exit Play Mode, + recompile, and enter it again. A tagged method is `public`, instance or static, and returns + `void` or `IEnumerator` (a running coroutine keeps its old body; new `StartCoroutine` calls get + the new one). 2. With the game running, edit the method body on disk. 3. Apply (re-run to iterate): ```bash unity command script.methodreload reload --filename Assets/Spinner.cs + unity command script.methodreload reload_player Assets/Scripts/Player.cs # device, IL2CPP too ``` - Add `--pdb` to debug it: it emits a portable PDB mapped to your source so breakpoints bind - (attach the IDE + enable Editor Attaching; compiles unoptimized). Without it, no symbols. - -Constraints: `void` instance methods only; **public** members only. + `--pdb` on `reload` emits a source-mapped PDB so IDE breakpoints bind (compiles unoptimized). -`unity command script.methodreload status` shows active overrides. `reload` options: `--timeout -` (default 60; the CLI's `--timeout` is the command's own), `--assembly-dir ` (persist -DLLs instead of in-memory); `script.methodreload cleanup --assembly-dir ` clears old DLLs. +`unity command script.methodreload status` shows active overrides. ## 4. Bulk construction: `script run` (the builder pattern) @@ -102,7 +131,7 @@ a 15–20s recompile. # 2. Run it — relative paths resolve against the project root (the parent of Assets/): unity command script run --file AgentScripts/Build.cs --entry Build.All # 3. Iterate: edit the file, re-run. Useful extras: -unity command script run --file AgentScripts/Build.cs --dry-run true # compile-only check: diagnostics, nothing loaded or executed +unity command script run --file AgentScripts/Build.cs --dry-run # compile-only check: diagnostics, nothing loaded or executed unity command script run --file AgentScripts/Build.cs --entry Build.All --args '[3, "Green"]' ``` @@ -141,132 +170,80 @@ unity command script eval --caller plugin --skill unity-pipeline "return UnityEd - `await Wait.Until(() => condition)` waits without blocking the Editor; `Wait.For(asyncOperation)` and `Wait.ForImport(assetPath)` cover operations and imports. Submit a long wait with `--detach`, then `unity job wait `. -- A failed eval exits 6 with an `errorCode`: `COMPILATION_ERROR` (each error with its line and - column), `RUNTIME_EXCEPTION` (exception and stack trace), `TIMEOUT` or `INVALID_COMMAND_ARGS`. -- `script eval_file` is deprecated; use `script eval --file`. +- A failed eval exits 6 with an `errorCode`: -## 6. Play Mode vs. Multiplayer Play Mode (MPPM) scenarios + | `errorCode` | Cause | Resolution | + |-------------|-------|------------| + | `COMPILATION_ERROR` | The code doesn't compile; each error has its line and column. | Fix the code at those lines; `--auto-import` adds missing usings. | + | `RUNTIME_EXCEPTION` | The code threw; the result has the exception and stack trace. | Fix the failing line the stack trace names. | + | `TIMEOUT` | The code ran past `--timeout`. | Raise `--timeout`, or submit with `--detach` and `unity job wait`. | + | `INVALID_COMMAND_ARGS` | The arguments are invalid or conflict. | Fix the command line. | -These are two different things — do not conflate them. +## 6. Authoring scenes, GameObjects, prefabs and assets -### Single-player: normal Play Mode (main Editor only) +The `scene`, `gameobject`, `component`, `prefab` and `asset` groups edit content directly, with no +script. Objects are addressed by a handle (globalId, path, guid, instanceId or hierarchy path), and +each result returns one to chain into the next call. Scene edits are undoable and blocked in Play +Mode. For many objects, use `gameobject create_many` or a `script run` builder (§4). ```bash -unity command editor.playmode start # enter Play Mode -unity command editor.playmode pause # toggle pause -unity command editor.playmode stop # exit Play Mode +unity command scene get_hierarchy # the active scene's objects +unity command gameobject create --name Enemy --primitive cube +unity command component add --target --type Rigidbody +unity command component set_properties --target --type Rigidbody --properties '{"m_Mass":2}' +unity command prefab create --source --path Prefabs/Enemy +unity command scene save ``` -`editor.playmode start` runs the main Editor's **open scene** in Play Mode: **one** instance, never -MPPM virtual players, even if configured. Use it for single-instance testing and method reload. - -### Multiplayer: Play Mode Scenarios (main Editor + virtual players) - -A **Play Mode Scenario** is an asset (an `OrchestratedScenario`, e.g. -`Assets/Settings/PlayMode/2Players.asset`) describing the main Editor plus one or more virtual -players. Each virtual player (clone) is a **separate Unity project** at -`/Library/VP/` with its **own Library, port, and Pipeline server** — not a second -window of the main Editor. Run a scenario with the scenario commands (they drive MPPM's -`PlayModeScenarioManager`, which enters Play Mode itself), never with `editor.playmode start`, -which fights MPPM's play-mode guard: +## 7. Play Mode and multiplayer ```bash -unity command editor.playmode list_scenarios # discover scenario assets -unity command editor.playmode list_players # players the active scenario declares -unity command editor.playmode set_active_scenario --path Assets/Settings/PlayMode/2Players.asset -unity command editor.playmode start_scenario # run the active scenario -unity command editor.playmode get_scenario_status # live scenario + play-mode state -unity command editor.playmode stop_scenario # stop it +unity command editor.playmode start # enter Play Mode (also pause, stop) ``` -Authoring the asset (Edit Mode): +`editor.playmode start` runs the main Editor's open scene: **one** instance, never Multiplayer Play +Mode (MPPM) virtual players, even if configured. -```bash -unity command editor.playmode create_scenario --name MyScenario # auto-adds the Main Editor player -unity command editor.playmode add_player --path Assets/Settings/PlayMode/MyScenario.asset --type clone --name "Player 2" -unity command editor.playmode remove_player --id --path Assets/Settings/PlayMode/MyScenario.asset --confirm true # id: GUID on 6000.5+, player name on 6000.3/6000.4 -``` - -MPPM has four player slots, and slot 0 (`Player 1`) is always the Main Editor. A scenario therefore -holds at most **3 clones** (`Player 2`–`Player 4`): a 4-player scenario is the Main Editor plus 3 clones, -and a fourth clone is refused. For more players, add built players with `--type local`. - -The `editor.playmode` scenario commands need **Unity 6000.3+** *and* the `com.unity.multiplayer.playmode` -package. Without both they are compiled out and calling one fails as an unknown command, so run -`unity command editor.playmode` and check that `start_scenario` and the other scenario commands are listed -before using them. The group itself always exists: `editor.playmode list_instances` needs neither -and always works. You may only `editor.playmode set_active_scenario` while state is **Idle**. - -Player editors launch **asynchronously**, so after `editor.playmode start_scenario` poll -`editor.playmode get_scenario_status`. Its `players` array has one entry per player the scenario declares — not -MPPM's fixed four slots — and each entry carries both `state` (`NotLaunched` / `Launching` / -`Launched` / `UnexpectedlyStopped`) and, once that player's Editor is up, `reachable: true` with the -`port` and `projectPath` you need to drive it. Wait for `reachable`, then address it with -`--project-path`. Watch `state` to tell a slow launch (`Launching`) from a dead one -(`UnexpectedlyStopped`) — a missing descriptor alone cannot distinguish those. - -### Discovering and driving the clones - -The CLI folds a project's own clones into its main Editor, so a running scenario adds no -ambiguity by itself. But with another Unity project open, `unity command` with no `--project-path` -picks the Editor whose project contains the current directory (and fails as ambiguous outside -both). When more than one project is open, pass `--project-path ` to the main Editor -commands above. Each clone runs its own server, so address one by its project directory: +**MPPM scenarios.** Run a scenario with the scenario commands, never with `editor.playmode start`, +which fights MPPM's play-mode guard: ```bash -# List every running instance (main + clones): role, port, pid, vpId, projectPath -unity command editor.playmode list_instances - -# Talk to a clone directly, using the projectPath that listed it -unity command --project-path /Library/VP/ editor status -# Each clone is its own Editor: keep it ticking before running tests on it -unity command --project-path /Library/VP/ editor set_auto_tick --enabled true -unity command --project-path /Library/VP/ test run --mode playmode +unity command editor.playmode list_scenarios +unity command editor.playmode set_active_scenario --path Assets/Settings/PlayMode/2Players.asset # only while Idle +unity command editor.playmode start_scenario +unity command editor.playmode get_scenario_status # poll: players launch asynchronously +unity command editor.playmode stop_scenario ``` -`unity pipeline list` also reports clones, named by player ("Player 2") against the project they're -playing. There is no forwarding command — talk to the clone. That way you get its full command -surface and its own status, and nothing queues behind the main Editor. - -### Multiplayer Roles (client / server stripping) - -Multiplayer Roles decide what is stripped from a client or a server: the Editor runs as one role in -Play Mode, and each GameObject or component is kept for some roles and stripped from the others. -Use the `multiplayer.role` commands rather than reflecting over `EditorMultiplayerRolesManager` in -`script eval`: - -```bash -unity command settings.multiplayer_roles get # enabled? safety checks, server stripping -unity command settings.multiplayer_roles set --settings '{"enabled":true}' --confirm true # nothing is stripped until roles are enabled -unity command multiplayer.role get_active # Editor role, and whether roles are enabled -unity command multiplayer.role set_active --role server # role the Editor plays as (Edit Mode only) -unity command multiplayer.role set_game_object --target --role server # the GameObject -unity command multiplayer.role set_component --target --type AudioSource --role client # one of its components -unity command multiplayer.role set_component --target --role client # a component by handle -unity command multiplayer.role set_build --role server # role the active build profile builds for -``` +- They need Unity 6000.3+ and the `com.unity.multiplayer.playmode` package; otherwise they are + compiled out. Run `unity command editor.playmode` and check `start_scenario` is listed first. +- Each virtual player (clone) is a **separate Unity project** at `/Library/VP/` with + its own server. Wait for its `get_scenario_status` entry to show `reachable: true` (`Launching` + is slow, `UnexpectedlyStopped` is dead), then address it with that entry's `projectPath`. There + is no forwarding command: set auto tick and run tests on the clone itself. + ```bash + unity command --project-path /Library/VP/ test run --mode playmode --async-tests true + unity command --project-path /Library/VP/ test status # repeat until done + ``` -`role` is `client`, `server` or `client_and_server`. The group needs **Unity 6000.6+**; on older -Editors it is compiled out, so run `unity command multiplayer.role` to check it is listed. +**Multiplayer Roles** (client/server stripping, Unity 6000.6+). Nothing is stripped until roles are +enabled with `settings.multiplayer_roles set`. Assign roles with the `multiplayer.role` commands, +not by reflecting over `EditorMultiplayerRolesManager` in `script eval`; run +`unity command multiplayer.role` to check the group is listed. -## 7. Screen capture (Editor) +## 8. Screen capture (Editor) Capture a view to a PNG to check a visual result. ```bash unity command capture game_view --output-path Screenshots/hud.png # what the Game window shows, incl. overlay UI unity command capture scene_view --max-resolution 512 # the scene only (camera render), inline, longest edge capped -unity command capture scene_view --source screen --output-path Screenshots/scene.png # the Scene window with grid, gizmos, toolbars unity command capture editor_window --window Inspector --output-path Screenshots/inspector.png # any open Editor window ``` -Without `--output-path` the image comes back inline (base64); `--include-inline-image true` gives -both. A relative path resolves from the project root (no `.meta` outside `Assets/`). `game_view` -opens a Game view if none is showing, in batchmode too. `game_view --source camera --camera ` -renders one camera; overlay UI is drawn on URP/HDRP (`--overlay auto|true|false`), not on Built-in. -`editor_window` and `scene_view --source screen` briefly front a background tab and don't work in -batchmode. `capture screenshot` is deprecated. On 6000.7+, `capture editor_element` / -`runtime_element` capture one UI Toolkit element by `--selector`. +Without `--output-path` the image comes back inline (base64). A relative path resolves from the +project root. `editor_window` and `scene_view --source screen` briefly front a background tab and +don't work in batchmode. ## Gotchas @@ -274,6 +251,8 @@ batchmode. `capture screenshot` is deprecated. On 6000.7+, `capture editor_eleme thread until dismissed. If a command runs long, check `unity command editor status` (answers instantly even when blocked); `status: "blocked_by_dialog"` means stop retrying and tell the human what's blocking (its `dialog.title`/`message`/`buttons`) — it can't be clicked over CLI. + Some dialogs (`EditorUtility.DisplayDialog`) aren't detected yet: `editor status` itself then + times out. Treat that as the same case and ask the human to look at the Editor. - **Player-only commands need a dev Player.** `console write`, `runtime set_time_scale`, `runtime status`, etc. hit the Runtime server, which does not run in the Editor. - **Target a specific instance** when more than one is running: `--project-path ` selects an @@ -286,10 +265,11 @@ batchmode. `capture screenshot` is deprecated. On 6000.7+, `capture editor_eleme unity command console status # groundTruth.consoleErrors must be 0, compilationFailed false unity command console get --level error # read any errors it reports ``` -2. If you changed runtime behaviour, enter Play Mode (`unity command editor.playmode start`), exercise - the change, and read back the `Debug.Log` lines you added with `unity command console get`. Confirm - they show the fix works, then stop Play Mode and remove those lines unless the user wants them kept. -3. If the fix doesn't work, go back and reread the relevant [Topic map](#topic-map) pages before you +2. If you fixed or suspect a runtime fault, enter Play Mode once (`unity command editor.playmode start`), + check the behavior with `unity command script eval`, then stop Play Mode. Add no logging and take + no screenshots to do this. +3. Otherwise, with zero errors, stop there unless the user asked for proof that the change works. +4. If the fix doesn't work, go back and reread the relevant [Topic map](#topic-map) pages before you try again, rather than retrying from memory. ## Final report @@ -304,22 +284,27 @@ End with a short report to the user: ## Topic map -The Pipeline package ships its documentation in its `Documentation~` folder. For a registry install -that is `/Library/PackageCache/com.unity.pipeline@*/Documentation~/`; the same pages are -published at `https://docs.unity3d.com/Packages/com.unity.pipeline@/`. Only read what you need. +The Pipeline package ships its documentation in its `Documentation~` folder: for a registry install +`/Library/PackageCache/com.unity.pipeline@*/Documentation~/`, for a local or embedded +package the folder next to its `package.json`. The same pages are published at +`https://docs.unity3d.com/Packages/com.unity.pipeline@/`. Only read what you need. Prefer the local copy: it matches the installed package. For the live pages, fetch the exact URL -rather than searching; `` is the major.minor of `com.unity.pipeline` in -`Packages/packages-lock.json`, e.g. `@0.9`. +rather than searching, e.g. +`https://docs.unity3d.com/Packages/com.unity.pipeline@/connectivity.md`, where +`` is the major.minor of `com.unity.pipeline` in `Packages/packages-lock.json`, e.g. `@1.0`. | Topic | Page | |-------|------| | Connecting to an Editor or Player, ports, `--project-path` | `connectivity.md` | | Dev Player and Runtime server setup | `runtime-setup.md` | -| Method reload (`[MethodReload]`, `script.methodreload`) | `method-reload.md` | +| Method reload (`[MethodReload]`, `script.methodreload`, both backends) | `method-reload.md` | | `script run`, `script eval`, `script recompile` | `commands/scripts.md` | | Compiling and running tests | `commands/build-and-compilation.md` | | `editor status`, `editor set_auto_tick`, modal dialogs | `commands/editor-lifecycle-and-observability.md` | +| Scenes, GameObjects and components, prefabs, assets | `commands/scenes.md`, `commands/gameobjects-and-components.md`, `commands/prefabs.md`, `commands/assets-and-files.md` | | Play Mode scenarios, virtual players, clones | `commands/multiplayer-play-mode.md` | +| Multiplayer Roles | `commands/multiplayer-roles.md` | +| Waiting on a condition server-side (`job wait`) | `commands/wait.md` | | Screen capture | `commands/capture.md` | | `console get` / `console status`, Runtime commands | `commands/runtime.md` |