2d-pixel-perfect
Sets up, diagnoses, and fixes pixel perfect 2D rendering with PixelPerfectCamera in URP or Built-in. Use when a retro-style or…
Manages SpriteAtlas assets through a prebuild pipeline, covering master and variant atlases, packing settings, and platform overrides. Use when asked to create or optimize sprite atlases.
$ npx -y skills add unity-technologies/skills --skill manage-sprite-atlas --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/manage-sprite-atlasContext preview
The summary Claude sees to decide when to auto-load this skill.
Manages SpriteAtlas assets through a prebuild pipeline, covering master and variant atlases, packing settings, and platform overrides. Use when asked to create or optimize sprite atlases.
name: manage-sprite-atlas description: Manages SpriteAtlas assets through a prebuild pipeline, covering master and variant atlases, packing settings, and platform overrides. Use when asked to create or optimize sprite atlases.
Provides *editor-safe* procedural knowledge for scripting atlases in Unity projects. **V2 enforces strict separation between editor authoring and runtime access.**
> ⚠ **Critical V2 Principle**: `SpriteAtlas` is **runtime-only**. `SpriteAtlasAsset` is **editor-only**. Never mix contexts. Always use V2.
**ALWAYS perform these checks and ask these questions BEFORE generating any code:**
This skill ships working C# under `resources/`, and the atlas code that goes wrong is almost always code written without reading it first. Open the files for the path you are taking, then write.
| Taking this path | Read first | |---|---| | Any atlas work at all | [resources/authoringvsruntime.cs](resources/authoringvsruntime.cs), [references/common-errors.md](references/common-errors.md) | | Prebuild generation (the default) | [resources/spriteatlasprebuildgenerator.cs](resources/spriteatlasprebuildgenerator.cs), [resources/enablespritepacking.cs](resources/enablespritepacking.cs), [resources/savespriteatlasasset.cs](resources/savespriteatlasasset.cs) | | Option B, Addressables late-binding | [resources/buildaddressablespostprocess.cs](resources/buildaddressablespostprocess.cs), [resources/spriteatlaslatebinding.cs](resources/spriteatlaslatebinding.cs), [resources/handlelatebinding.cs](resources/handlelatebinding.cs) | | Anything that might use an older API | [resources/deprecatedmethods.cs](resources/deprecatedmethods.cs), [resources/dontscriptspriteatlasineditor.cs](resources/dontscriptspriteatlasineditor.cs), [resources/dontpackinruntimebuilds.cs](resources/dontpackinruntimebuilds.cs) |
`resources/` holds 38 files in all, covering custom packers, variants, platform settings, and runtime access. Browse the directory when your task is not in the table above rather than inventing an approach. Reaching for the API from memory instead of reading these is the single most common cause of an atlas that imports cleanly and then does nothing at runtime.
**BEFORE generating any code, scan the project for existing SpriteAtlas scripts generated by this skill.**
Search for files containing the identifier: `// [UNITY-SKILL:SPRITEATLAS]`
**If existing scripts are found, ALWAYS ask the user with this format:**
> "I found existing SpriteAtlas scripts in your project: > > **Prebuild Generator:** > - `Assets/Editor/SpriteAtlas/SpriteAtlasPrebuildGenerator.cs` > > **Addressables Builder:** > - `Assets/Editor/SpriteAtlas/BuildAddressablesPostprocess.cs` > > **Runtime Loader:** > - `Assets/Scripts/SpriteAtlas/SpriteAtlasLateBinding.cs` > > What would you like to do?"
**Then present options:**
**User Choice Handling:**
Ask: "How do you want to deliver the sprite atlases?"
**Option A: Built-in Data (Immediate Loading)**
**Option B: Late-Binding via Addressables (On-Demand Loading)**
| Use Case | Recommended | |----------|-------------| | Core UI sprites that are always visible | **Option A: Built-in** | | Tutorial or onboarding sprites | **Option A: Built-in** | | Level-specific sprites (100+ levels) | **Option B: Addressables** | | DLC or seasonal content | **Option B: Addressables** | | Localized UI sprites (multiple languages) | **Option B: Addressables** | | Character skins or cosmetics | **Option B: Addressables** |
**Enable Sprite Packer mode before creating atlases, then read the setting back and confirm it took.** Use the code in [resources/enablespritepacking.cs](resources/enablespritepacking.cs); it sets `EditorSettings.spritePackerMode` and configures the importer's packing settings.
This is the step that decides whether the atlas you produce is real. `Disabled` is the zero value of `SpritePackerMode`, so any project where nobody has set it carries packing **Disabled**, and an atlas created while it is Disabled still imports, still shows
A collection of reusable AI agent skills for Unity workflows. Compatible with Claude Code, GitHub Copilot, Cursor, Cline, and 50+ other agents.
Sets up, diagnoses, and fixes pixel perfect 2D rendering with PixelPerfectCamera in URP or Built-in. Use when a retro-style or…
Imports 3D models and point clouds with Asset Transformer Toolkit (formerly Pixyz), and creates, edits, and runs RuleSets,…
Routes Audio Sources into existing Audio Mixer Groups, classifying each source by what it plays. Use when the user asks about…
Builds node-based Editor tools with Unity Graph Toolkit (GTK) on Unity 6.6+: graphs, nodes, ports and validation, State Machine…
Builds and operates live games with Unity Services. Use when the user asks about backend or live-ops features such as player…
Creates and fixes Unity 2D physics in both systems, 2D Physics Core and the legacy Rigidbody 2D system. Use when the user asks…