asset-transformer-tool…
Imports 3D models and point clouds with Asset Transformer Toolkit (formerly Pixyz), and creates, edits, and runs RuleSets,…
Sets up, diagnoses, and fixes pixel perfect 2D rendering with PixelPerfectCamera in URP or Built-in. Use when a retro-style or pixel art 2D game looks blurry, jittery, or misaligned. Not for HD 2D or high-resolution art.
$ npx -y skills add unity-technologies/skills --skill 2d-pixel-perfect --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/2d-pixel-perfectContext preview
The summary Claude sees to decide when to auto-load this skill.
Sets up, diagnoses, and fixes pixel perfect 2D rendering with PixelPerfectCamera in URP or Built-in. Use when a retro-style or pixel art 2D game looks blurry, jittery, or misaligned. Not for HD 2D or high-resolution art.
name: 2d-pixel-perfect description: Sets up, diagnoses, and fixes pixel perfect 2D rendering with PixelPerfectCamera in URP or Built-in. Use when a retro-style or pixel art 2D game looks blurry, jittery, or misaligned. Not for HD 2D or high-resolution art.
Set up, diagnose, and fix pixel perfect 2D rendering in Unity projects.
---
Pixel perfect rendering in Unity is **not one system** — it is two separate, incompatible implementations, one per render pipeline. **Always detect the pipeline before writing or diagnosing any code.**
| | URP | Built-in | |---|---|---| | **Component** | `UnityEngine.Rendering.Universal.PixelPerfectCamera` | `UnityEngine.U2D.PixelPerfectCamera` | | **Package** | Built into URP — no extra install | `com.unity.2d.pixel-perfect` v6.0.0+ | | **API style** | Enums (`gridSnapping`, `cropFrame`) | Booleans (`pixelSnapping`, `upscaleRT`, `cropFrameX/Y`) |
**Do not install `com.unity.2d.pixel-perfect` in a URP project.**
**→ Always call `DetectPipeline()` first** (`references/pipeline-detection.cs`), then branch your setup, diagnostics, and fixes based on the result.
---
---
⚠ **Detect the render pipeline first** — URP and Built-in use different Pixel Perfect Camera components that are not interchangeable. ⚠ **Filter Mode = Point is the #1 fix** — bilinear filtering is Unity's default and is almost always the cause of blurry sprites. ⚠ **Anti-Aliasing must be disabled** — in Quality Settings and on the camera. AA actively blurs pixel edges.
See the two-path comparison table at the top of this file. Assembly name note: the standalone Built-in package installs into a `Runtime/` folder, but the asmdef `"name"` field is `Unity.2D.PixelPerfect` — no `Runtime` suffix. HDRP is unsupported — see the HDRP fallback section under Common Issues.
**→ Code: `references/pipeline-detection.cs`** — `DetectPipeline()`, `GetPixelPerfectCameraType()`, and migration mismatch check.
Always diagnose before making changes. Report findings, then fix only what is broken.
Default to scene scope. Scan project-wide only when the user explicitly requests it.
---
**Sprite import settings:**
**→ Code: `references/sprite-settings.cs`** — `GetImporter()` and `FixSpriteImportSettings()`.
**Editor snap settings:**
**Camera setup:**
**→ Code: `references/camera-setup-urp.cs`** — full URP camera + PP Camera configuration. **→ Code: `references/camera-setup-builtin.cs`** — Built-in standalone configuration.
**Project quality settings:**
---
Full property/method tables, `GridSnapping` and `CropFrame` enum values, and recommended configurations: **→ `references/api-reference.md`** — read this when writing or reviewing camera setup code.
Quick enum summary:
**`GridSnapping`**: `None` · `PixelSnapping` (standard) · `UpscaleRenderTexture` (authentic low-res; incompatible with post-processing and UI text)
**`CropFrame`**: `None` · `Pillarbox` · `Letterbox` · `Windowbox` (safest default) · `StretchFill`
---
Choose before building any assets. Never change after asset production starts.
| Reference resolution | 1080p | 1440p | 4K | |---|---|---|---| | 320 × 180 | 6× | 8× | 12× | | 480 × 270 | 4× | ~5.3× | 8× | | 640 × 360 | 3× | 4× | 6× |
320×180 is the safest general choice. For screens with no integer fit (e.g. 1366×768), use `cropFrame = Windowbox` to add black bars rather than stretching to a fractional scale.
---
**Symptom**: `DetectPipeline()` returns URP but camera has `UnityEngine.U2D.PixelPerfectCamera`. Symptoms are subtle because the standalone component has `ENABLE_URP` conditional code.
**Fix**: 1. Remove `com.unity.2d.pixel-perfect` from Package Manager 2. Remove `UnityEngine.U2D.PixelPerfectCamera` from each camera 3. Add `UnityEngine.Rendering.Universal.PixelPerfectCamera` 4. Reconfigure — booleans (`pixelSnapping`, `upscaleRT`, `cropFrameX/Y`) become enums (`gridSnapping`, `cropFrame`)
**→ Detection code: `references/pipeline-detection.cs`** (bottom of file).
**Symptom**: Compiler errors referencing `UnityEngine.Experimental.Rendering.Universal`.
**Fix**: Replace `using UnityEngine.Experimental.Rendering.Universal;` with `using UnityEngine.Rendering.Universal;`. Update any assembly-qualified type strings. The `[MovedFrom]` attribute handles serialization automatically — components on GameObjects survive the upgrade.
---
**F
A collection of reusable AI agent skills for Unity workflows. Compatible with Claude Code, GitHub Copilot, Cursor, Cline, and 50+ other agents.
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…
Create a 2D tile palette from sprites or textures, or make tiles change based on their neighbours. Use for tile palettes or…