
unity-tilemap-2d
Build and script 2D tilemaps in Unity 6.3 LTS: the Grid + Tilemap components, the Tile Palette, tilemap colliders, rule tiles, and runtime SetTile/GetTile painting. Use when painting tile levels, adding a TilemapCollider2D, using rule or animated tiles, generating tilemaps from code, or when the user mentions Unity tilemap, tile palette, rule tile, or Grid.
- Installs
- 5.8K
- Last 24h
- +307
- Trending rank
- #946
- Security
- Pass
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill unity-tilemap-2d- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads unity-tilemap-2d automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
Unity 2D Tilemap
Author and script tile-based 2D levels in Unity 6.3 LTS with the Grid/Tilemap system, the Tile
Palette, colliders, and runtime painting. Targets Unity 6.3 LTS (6000.3).
Package note: the core Tilemap (
Grid,Tilemap,Tile,TilemapCollider2D) is built in, and so is the Tile Palette with its default brush. Rule Tiles, Animated Tiles, and the extra brushes (Random, Line, GameObject, Group) live in the separate "2D Tilemap Extras" package (com.unity.2d.tilemap.extras, 6.0.x for Unity 6.3) — install it via Package Manager before usingRuleTile.
When to use
- Use when laying out a 2D level by painting tiles, setting up a
Grid+Tilemap, adding collision to the map, using auto-tiling Rule Tiles, or generating/editing tiles from script. - Use when scenes contain a
GridwithTilemapchildren, or*.assettile/palette files.
When not to use: level design practice (pacing, blockout, layout principles) →
level-design. 3D tile/grid placement → Unity's own 3D tooling (ProBuilder / grid brushes; no dedicated skill here). The platformer character that
moves over the tiles → platformer / unity-physics.
Core workflow
- Create the grid: GameObject → 2D Object → Tilemap → Rectangular (the
Grid's Cell Layout also offers Hexagonal and Isometric for hex/iso levels). This makes aGridwith a childTilemap(+TilemapRenderer). Use one Tilemap per layer (background, ground, foreground) and set each renderer's sorting. - Open the Tile Palette (Window → 2D → Tile Palette), drag in a sliced sprite sheet to
create
Tileassets, then paint with the brush tools. - Add collision to the solid layer:
TilemapCollider2D. For one merged collider (far cheaper and gap-free), also addCompositeCollider2D(+ aRigidbody2Dset to Static) and set the tilemap collider's Composite Operation to Merge. - Auto-tile with Rule Tiles (2D Tilemap Extras) so edges/corners pick the right sprite automatically instead of hand-placing every variant.
- Edit at runtime via script with cell coordinates (
Vector3Int):SetTile,GetTile,SetTilesBlock, converting world↔cell with theGrid/Tilemap. - Verify in Play mode: confirm collisions (Physics Debugger), sorting order, and that
RefreshAllTilesran after bulk edits.
Patterns
1. Painting tiles at runtime (cell coordinates)
using UnityEngine;
using UnityEngine.Tilemaps;
public class TilePainter : MonoBehaviour
{
[SerializeField] private Tilemap tilemap; // assign the target Tilemap
[SerializeField] private TileBase groundTile;
// World position -> cell, then place a tile.
public void PaintAt(Vector3 worldPos)
{
Vector3Int cell = tilemap.WorldToCell(worldPos);
tilemap.SetTile(cell, groundTile);
}
public bool IsSolid(Vector3 worldPos)
=> tilemap.GetTile(tilemap.WorldToCell(worldPos)) != null;
}
2. Bulk fill a region (faster than per-cell SetTile)
// SetTilesBlock writes a whole BoundsInt in one call — use it for procedural rooms/floors.
public void FillFloor(Tilemap map, TileBase tile, int width, int height)
{
var bounds = new BoundsInt(0, 0, 0, width, height, 1);
var tiles = new TileBase[width * height];
for (int i = 0; i < tiles.Length; i++) tiles[i] = tile;
map.SetTilesBlock(bounds, tiles);
}
3. Clearing and refreshing
tilemap.SetTile(cell, null); // null erases the tile at that cell
tilemap.RefreshTile(cell); // re-evaluate just this cell's rule/animated neighbors (cheap)
// RefreshAllTiles() re-evaluates the ENTIRE map — reserve it for full regenerations, not per-edit.
Pitfalls
RuleTiletype not found — it's not built in. Install the 2D Tilemap Extras package (com.unity.2d.tilemap.extras) via Package Manager.- A collider per tile tanks performance / leaves seams — add a
CompositeCollider2Dwith a staticRigidbody2Dand set Composite Operation to Merge to merge the whole layer into one smooth shape. - No "Used By Composite" checkbox, or an obsolete warning on
usedByComposite— Unity 6 replaced it with Composite Operation (Collider2D.compositeOperation). OldusedByComposite = truemaps toCompositeOperation.Merge; write that instead. - Small gaps remain between merged tiles — raise the Tilemap Collider 2D's Extrusion Factor so neighbouring tile shapes fall within the Composite Collider 2D's Vertex Distance.
- Confusing world and cell coordinates —
SetTile/GetTiletake aVector3Intcell, not a world position. Always convert withWorldToCell/CellToWorld. - Tiles render behind/in front of sprites unexpectedly — set each
TilemapRenderer's Sorting Layer and Order in Layer; multiple tilemaps need explicit ordering. - Rule/animated tiles don't update after script edits — refresh after writes, but prefer
the targeted
RefreshTile(cell)for a few edits;RefreshAllTiles()re-evaluates every tile on the map and stalls large levels. Reserve the full refresh for whole-map regenerations. - Painting onto the wrong layer — the active target Tilemap in the Tile Palette determines where paint lands; check the "Active Tilemap" dropdown.
References
- Primary docs: Unity Manual "Tilemaps"
(
https://docs.unity3d.com/Manual/tilemaps/work-with-tilemaps/tilemap-reference.html),ScriptReference/Tilemaps.Tilemap,ScriptReference/Collider2D-compositeOperation, the Manual "Tilemap Collider 2D component reference", and the 2D Tilemap Extras package manual (https://docs.unity3d.com/Packages/com.unity.2d.tilemap.extras@6.0/manual/index.html) for Rule Tiles. (@6.0is the version that ships with Unity 6.3 LTS; the old@1.6docs are for Unity 2021-era projects.)
Related skills
level-design— engine-agnostic blockout, pacing, and tile layout practice.procedural-gen— generating the tile data (noise, RNG, dungeons) you feed toSetTilesBlock.platformer/roguelike— genres that compose this skill with movement and generation.
FAQ
What does the unity-tilemap-2d skill do?
Build and script 2D tilemaps in Unity 6.3 LTS: the Grid + Tilemap components, the Tile Palette, tilemap colliders, rule tiles, and runtime SetTile/GetTile painting. Use when painting tile levels, adding a TilemapCollider2D, using rule or animated tiles, generating tilemaps from code, or when the user mentions Unity tilemap, tile palette, rule tile, or Grid.
How do I install unity-tilemap-2d?
Run npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill unity-tilemap-2d in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/unity-tilemap-2d/ (personal) or .claude/skills/unity-tilemap-2d/ (project).
Which AI agents can use unity-tilemap-2d?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is unity-tilemap-2d safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains unity-tilemap-2d?
It is published by gamedev-skills in gamedev-skills/awesome-gamedev-agent-skills. It has 5,792 recorded installs.
More from gamedev-skills/awesome-gamedev-agent-skills
game-feel
gamedev-skills/awesome-gamedev-agent-skills
Add "juice" and game feel that makes actions satisfying — screen shake, hit-stop/freeze frames, tweened/eased motion, squash & stretch, knockback, and layered audio-visual feedback — as engine-neutral techniques that pair with the detected engine's tween, particle, and camera APIs. Use when the user mentions game feel, juice, "make it feel good/punchy", screen shake, hit stop, screen freeze, easing, squash and stretch, impact frames, or feedback/polish on hits, jumps, pickups, and deaths.
game-ui-ux
gamedev-skills/awesome-gamedev-agent-skills
Design and build game UI/UX — HUDs, menus, and overlays — that survive every screen: anchor- based responsive layout, resolution/aspect scaling and safe areas, keyboard/gamepad focus navigation, a screen/menu state stack, and event-driven (not polled) HUD updates. Engine- neutral patterns that pair with the detected engine's UI skill. Use when the user mentions HUD, health bar, main menu, pause menu, settings screen, UI layout, anchors, UI scaling, aspect ratio, safe area, controller/keyboard menu navigation, or wiring UI to game state.
level-design
gamedev-skills/awesome-gamedev-agent-skills
Design and build playable levels — the blockout/whitebox-to-playable workflow, player metrics and grid layout, pacing and flow (tension/rest curve), gating and the critical path, and encounter design. Engine-neutral practice. Use when the user mentions level design, blockout/whitebox/greybox, level layout, level pacing, encounter design, or the critical path through a level.
performance-optimization
gamedev-skills/awesome-gamedev-agent-skills
Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object pooling, draw-call batching, fewer allocations/GC spikes, and asset budgets. Engine- neutral method that pairs with each engine's profiler. Use when the user mentions performance, optimize, low/dropping FPS, frame drops, stutter, lag, profiler, frame budget, draw calls, batching, garbage collection/GC spikes, object pooling, or "the game runs slow".
game-ai
gamedev-skills/awesome-gamedev-agent-skills
Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API. Use when building enemy AI, an FSM or behavior tree, steering/flocking, or pathfinding, or when the user mentions state machine, behavior tree, blackboard, A, navmesh, seek, or patrol/chase.
audio-design
gamedev-skills/awesome-gamedev-agent-skills
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX variation, and beat synchronization. Engine-neutral. Use when the user mentions audio mixing, audio buses, adaptive/dynamic music, ducking, SFX variation, music layers, or syncing gameplay to the beat.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available