This skill guides an agent through building tile-based 2D levels in Unity 6.3 LTS. It covers a Grid with one Tilemap per layer, collision merged through a Composite Collider 2D, Rule Tiles from the 2D Tilemap Extras package, and painting or erasing cells from script with SetTile and SetTilesBlock.
It also lists the problems that show up in practice: seams between tile colliders, a RuleTile type that cannot be found, world and cell coordinates mixed up, and cell bounds that stay large after tiles are erased.
What You Get
- A six-step workflow from package gating to verification
- C# patterns for painting and querying tiles, filling a region with SetTilesBlock, and creating Tile assets from a sliced sprite sheet in editor code
- Collider guidance: Tilemap Collider 2D with a static Composite Collider 2D set to Merge
- Verification routes that grep the scene YAML, query a ready Editor through the Unity CLI, or run tests
- A gotcha list for seams, sorting, refresh costs, bounds and the Unity 6 compositeOperation change
Common Use Cases
- Painting a platformer level and giving it one merged collider with no seams
- Generating rooms or floors from script with SetTilesBlock
- Setting up Rule Tiles for auto-tiling terrain edges and corners
- Working out why a RuleTile type is missing or tiles draw under sprites
What Makes It Unique
The skill treats the scene file as evidence: it tells the agent which Tilemap and TilemapCollider2D lines to grep so a merged collider and painted cells can be confirmed without an Editor. It separates what is built in from what needs the 2D Tilemap Extras package, and it points to level design, procedural generation and physics skills for the parts it does not cover.
Under The Hood
The agent loads the SKILL.md and works in your Unity project. It checks the package lock file, greps scene YAML, writes C# scripts including editor scripts that create Tile assets, and can run them with the Unity command line tool or in batch mode. When an Editor is ready it can evaluate scripts and read back tile counts and collider paths. It does not fetch web pages or call outside services, and it asks before adding a package.