Skip to content

Commit b5f5960

Browse files
committed
docs(sprite): add the sprite group to the CLI guides
#1429 rebuilt the "Complete Command Reference" table in website/docs/guides/cli.md from the Click command tree, before this branch's `sprite` group was on beta. Rebuilt from this branch's tree, the only change is the one `sprite` row. Both CLI guides also get a short sprite section next to the texture one.
1 parent 4800c4a commit b5f5960

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

‎Server/src/cli/CLI_USAGE_GUIDE.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,23 @@ unity-mcp texture delete "Assets/Textures/Old.png"
807807
unity-mcp texture delete "Assets/Textures/Old.png" --force
808808
```
809809

810+
### Sprite Commands
811+
812+
```bash
813+
# Read a sheet's size, import settings and slices (the image itself is the file)
814+
unity-mcp sprite info "Assets/Sprites/Hero.png"
815+
816+
# Slice into a grid: --cols/--rows, or --frame-width/--frame-height
817+
unity-mcp sprite slice "Assets/Sprites/Hero.png" --cols 6 --rows 4
818+
819+
# Clips from the slices, then a controller from the clips
820+
unity-mcp sprite setup-clips "Assets/Sprites/Hero.png" --clips '[{"name": "walk", "start_frame": 0, "end_frame": 5}]'
821+
unity-mcp sprite setup-controller "Assets/Animators/Hero.controller" --clips '[{"name": "walk", "path": "Assets/Sprites/walk.anim"}]'
822+
823+
# All of it in one step (--add-to-scene needs --scene-target, an existing GameObject)
824+
unity-mcp sprite full-setup "Assets/Sprites/Hero.png" --cols 6 --rows 4 --clips '[{"name": "idle", "start_frame": 0, "end_frame": 5}, {"name": "walk", "start_frame": 6, "end_frame": 11}]' --controller-path "Assets/Animators/Hero.controller" --add-to-scene --scene-target Hero
825+
```
826+
810827
### Code Commands
811828

812829
```bash

‎website/docs/guides/cli.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,16 @@ unity-mcp texture delete "Assets/Textures/Old.png" [--force]
471471
# Patterns: checkerboard, stripes, stripes_h, stripes_v, stripes_diag, dots, grid, brick
472472
```
473473

474+
### Sprite Animation
475+
476+
```bash
477+
unity-mcp sprite info "Assets/Sprites/Hero.png" # Size, import settings, slices
478+
unity-mcp sprite slice "Assets/Sprites/Hero.png" --cols 6 --rows 4 # Or --frame-width/--frame-height
479+
unity-mcp sprite setup-clips "Assets/Sprites/Hero.png" --clips '[{"name": "walk", "start_frame": 0, "end_frame": 5}]'
480+
unity-mcp sprite setup-controller "Assets/Animators/Hero.controller" --clips '[{"name": "walk", "path": "Assets/Sprites/walk.anim"}]'
481+
unity-mcp sprite full-setup "Assets/Sprites/Coin.png" --cols 8 --animation-name spin
482+
```
483+
474484
### Build Operations
475485

476486
```bash
@@ -576,6 +586,7 @@ unity-mcp raw manage_packages '{"action": "list_packages"}'
576586
| `scene` | `active`, `build-settings`, `close`, `create`, `hierarchy`, `load`, `loaded`, `move-to`, `open-additive`, `save`, `set-active`, `validate` |
577587
| `script` | `create`, `delete`, `edit`, `read`, `validate` |
578588
| `shader` | `create`, `delete`, `read`, `update` |
589+
| `sprite` | `full-setup`, `info`, `setup-clips`, `setup-controller`, `slice` |
579590
| `texture` | `create`, `delete`, `modify`, `set-import-settings`, `sprite` |
580591
| `tool` | `list` |
581592
| `ui` | `create-button`, `create-canvas`, `create-image`, `create-text` |

0 commit comments

Comments
 (0)