[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79QHS0PSGR7875XN6EZCV3M":3,"skill-same:01M79QHS0PSGR7875XN6EZCV3M":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M79QHS0PSGR7875XN6EZCV3M","unity-tilemap-2d",null,"Build and script 2D tilemaps in Unity 6.3 LTS: the Grid + Tilemap components, the Tile Palette, tilemap colliders, rule tiles, and runtime SetTile\u002FGetTile 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.","JunMystery\u002FAgent-Guidance","JunMystery","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F161468934?v=4","01M79MTMV8F0BY8NK1A92RA8A0","Jun","01M79MTMWCFBKPHN5B25E6V20B",0,"MIT","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Funity-tilemap-2d\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: unity-tilemap-2d\ndescription: >\n  Build and script 2D tilemaps in Unity 6.3 LTS: the Grid + Tilemap components, the Tile Palette,\n  tilemap colliders, rule tiles, and runtime SetTile\u002FGetTile painting. Use when painting tile\n  levels, adding a TilemapCollider2D, using rule or animated tiles, generating tilemaps from\n  code, or when the user mentions Unity tilemap, tile palette, rule tile, or Grid.\n---\n\n# Unity 2D Tilemap\n\nAuthor and script tile-based 2D levels in Unity 6.3 LTS with the `Grid`\u002F`Tilemap` system, the Tile\nPalette, colliders, and runtime painting. Targets **Unity 6.3 LTS (6000.3)**.\n\n> **Package note:** the core Tilemap (`Grid`, `Tilemap`, `Tile`, `TilemapCollider2D`) is\n> built in, and so is the Tile Palette with its default brush. **Rule Tiles, Animated Tiles,\n> and the extra brushes (Random, Line, GameObject, Group) live in the separate \"2D Tilemap\n> Extras\" package (`com.unity.2d.tilemap.extras`, 6.0.x for Unity 6.3)** — install it via\n> Package Manager before using `RuleTile`.\n\n## When to use\n\n- Use when laying out a 2D level by painting tiles, setting up a `Grid` + `Tilemap`, adding\n  collision to the map, using auto-tiling Rule Tiles, or generating\u002Fediting tiles from script.\n- Use when scenes contain a `Grid` with `Tilemap` children, or `*.asset` tile\u002Fpalette files.\n\n**When _not_ to use:** level _design_ practice (pacing, blockout, layout principles) →\n`level-design`. 3D tile\u002Fgrid placement → Unity's own 3D tooling (ProBuilder \u002F grid brushes; no dedicated skill here). The platformer character that\nmoves over the tiles → `platformer` \u002F `unity-physics`.\n\n## Core workflow\n\n1. **Create the grid:** GameObject → 2D Object → Tilemap → Rectangular (the `Grid`'s **Cell\n   Layout** also offers Hexagonal and Isometric for hex\u002Fiso levels). This makes a `Grid`\n   with a child `Tilemap` (+ `TilemapRenderer`). Use one Tilemap per layer (background,\n   ground, foreground) and set each renderer's sorting.\n2. **Open the Tile Palette** (Window → 2D → Tile Palette), drag in a sliced sprite sheet to\n   create `Tile` assets, then paint with the brush tools.\n3. **Add collision** to the solid layer: `TilemapCollider2D`. For one merged collider (far\n   cheaper and gap-free), also add `CompositeCollider2D` (+ a `Rigidbody2D` set to **Static**)\n   and set the tilemap collider's **Composite Operation** to **Merge**.\n4. **Auto-tile with Rule Tiles** (2D Tilemap Extras) so edges\u002Fcorners pick the right sprite\n   automatically instead of hand-placing every variant.\n5. **Edit at runtime via script** with cell coordinates (`Vector3Int`): `SetTile`, `GetTile`,\n   `SetTilesBlock`, converting world↔cell with the `Grid`\u002F`Tilemap`.\n6. **Verify** in Play mode: confirm collisions (Physics Debugger), sorting order, and that\n   `RefreshAllTiles` ran after bulk edits.\n\n## Patterns\n\n### 1. Painting tiles at runtime (cell coordinates)\n\n```csharp\nusing UnityEngine;\nusing UnityEngine.Tilemaps;\n\npublic class TilePainter : MonoBehaviour\n{\n    [SerializeField] private Tilemap tilemap;   \u002F\u002F assign the target Tilemap\n    [SerializeField] private TileBase groundTile;\n\n    \u002F\u002F World position -> cell, then place a tile.\n    public void PaintAt(Vector3 worldPos)\n    {\n        Vector3Int cell = tilemap.WorldToCell(worldPos);\n        tilemap.SetTile(cell, groundTile);\n    }\n\n    public bool IsSolid(Vector3 worldPos)\n        => tilemap.GetTile(tilemap.WorldToCell(worldPos)) != null;\n}\n```\n\n### 2. Bulk fill a region (faster than per-cell `SetTile`)\n\n```csharp\n\u002F\u002F SetTilesBlock writes a whole BoundsInt in one call — use it for procedural rooms\u002Ffloors.\npublic void FillFloor(Tilemap map, TileBase tile, int width, int height)\n{\n    var bounds = new BoundsInt(0, 0, 0, width, height, 1);\n    var tiles  = new TileBase[width * height];\n    for (int i = 0; i \u003C tiles.Length; i++) tiles[i] = tile;\n    map.SetTilesBlock(bounds, tiles);\n}\n```\n\n### 3. Clearing and refreshing\n\n```csharp\ntilemap.SetTile(cell, null);   \u002F\u002F null erases the tile at that cell\ntilemap.RefreshTile(cell);     \u002F\u002F re-evaluate just this cell's rule\u002Fanimated neighbors (cheap)\n\u002F\u002F RefreshAllTiles() re-evaluates the ENTIRE map — reserve it for full regenerations, not per-edit.\n```\n\n## Pitfalls\n\n- **`RuleTile` type not found** — it's not built in. Install the **2D Tilemap Extras** package\n  (`com.unity.2d.tilemap.extras`) via Package Manager.\n- **A collider per tile tanks performance \u002F leaves seams** — add a `CompositeCollider2D` with a\n  static `Rigidbody2D` and set Composite Operation to **Merge** to merge the whole layer into\n  one smooth shape.\n- **No \"Used By Composite\" checkbox, or an obsolete warning on `usedByComposite`** — Unity 6\n  replaced it with **Composite Operation** (`Collider2D.compositeOperation`). Old\n  `usedByComposite = true` maps to `CompositeOperation.Merge`; write that instead.\n- **Small gaps remain between merged tiles** — raise the Tilemap Collider 2D's **Extrusion\n  Factor** so neighbouring tile shapes fall within the Composite Collider 2D's Vertex Distance.\n- **Confusing world and cell coordinates** — `SetTile`\u002F`GetTile` take a `Vector3Int` _cell_,\n  not a world position. Always convert with `WorldToCell` \u002F `CellToWorld`.\n- **Tiles render behind\u002Fin front of sprites unexpectedly** — set each `TilemapRenderer`'s\n  Sorting Layer and Order in Layer; multiple tilemaps need explicit ordering.\n- **Rule\u002Fanimated tiles don't update after script edits** — refresh after writes, but prefer\n  the targeted `RefreshTile(cell)` for a few edits; `RefreshAllTiles()` re-evaluates every tile\n  on the map and stalls large levels. Reserve the full refresh for whole-map regenerations.\n- **Painting onto the wrong layer** — the active target Tilemap in the Tile Palette determines\n  where paint lands; check the \"Active Tilemap\" dropdown.\n\n## References\n\n- Primary docs: Unity Manual \"Tilemaps\"\n  (`https:\u002F\u002Fdocs.unity3d.com\u002FManual\u002Ftilemaps\u002Fwork-with-tilemaps\u002Ftilemap-reference.html`),\n  `ScriptReference\u002FTilemaps.Tilemap`, `ScriptReference\u002FCollider2D-compositeOperation`, the\n  Manual \"Tilemap Collider 2D component reference\", and the 2D Tilemap Extras package manual\n  (`https:\u002F\u002Fdocs.unity3d.com\u002FPackages\u002Fcom.unity.2d.tilemap.extras@6.0\u002Fmanual\u002Findex.html`) for\n  Rule Tiles. (`@6.0` is the version that ships with Unity 6.3 LTS; the old `@1.6` docs are\n  for Unity 2021-era projects.)\n\n## Related skills\n\n- `level-design` — engine-agnostic blockout, pacing, and tile layout practice.\n- `procedural-gen` — generating the tile data (noise, RNG, dungeons) you feed to `SetTilesBlock`.\n- `platformer` \u002F `roguelike` — genres that compose this skill with movement and generation.\n","# Unity 2D Tilemap\n\nAuthor and script tile-based 2D levels in Unity 6.3 LTS with the `Grid`\u002F`Tilemap` system, the Tile\nPalette, colliders, and runtime painting. Targets **Unity 6.3 LTS (6000.3)**.\n\n> **Package note:** the core Tilemap (`Grid`, `Tilemap`, `Tile`, `TilemapCollider2D`) is\n> built in, and so is the Tile Palette with its default brush. **Rule Tiles, Animated Tiles,\n> and the extra brushes (Random, Line, GameObject, Group) live in the separate \"2D Tilemap\n> Extras\" package (`com.unity.2d.tilemap.extras`, 6.0.x for Unity 6.3)** — install it via\n> Package Manager before using `RuleTile`.\n\n## When to use\n\n- Use when laying out a 2D level by painting tiles, setting up a `Grid` + `Tilemap`, adding\n  collision to the map, using auto-tiling Rule Tiles, or generating\u002Fediting tiles from script.\n- Use when scenes contain a `Grid` with `Tilemap` children, or `*.asset` tile\u002Fpalette files.\n\n**When _not_ to use:** level _design_ practice (pacing, blockout, layout principles) →\n`level-design`. 3D tile\u002Fgrid placement → Unity's own 3D tooling (ProBuilder \u002F grid brushes; no dedicated skill here). The platformer character that\nmoves over the tiles → `platformer` \u002F `unity-physics`.\n\n## Core workflow\n\n1. **Create the grid:** GameObject → 2D Object → Tilemap → Rectangular (the `Grid`'s **Cell\n   Layout** also offers Hexagonal and Isometric for hex\u002Fiso levels). This makes a `Grid`\n   with a child `Tilemap` (+ `TilemapRenderer`). Use one Tilemap per layer (background,\n   ground, foreground) and set each renderer's sorting.\n2. **Open the Tile Palette** (Window → 2D → Tile Palette), drag in a sliced sprite sheet to\n   create `Tile` assets, then paint with the brush tools.\n3. **Add collision** to the solid layer: `TilemapCollider2D`. For one merged collider (far\n   cheaper and gap-free), also add `CompositeCollider2D` (+ a `Rigidbody2D` set to **Static**)\n   and set the tilemap collider's **Composite Operation** to **Merge**.\n4. **Auto-tile with Rule Tiles** (2D Tilemap Extras) so edges\u002Fcorners pick the right sprite\n   automatically instead of hand-placing every variant.\n5. **Edit at runtime via script** with cell coordinates (`Vector3Int`): `SetTile`, `GetTile`,\n   `SetTilesBlock`, converting world↔cell with the `Grid`\u002F`Tilemap`.\n6. **Verify** in Play mode: confirm collisions (Physics Debugger), sorting order, and that\n   `RefreshAllTiles` ran after bulk edits.\n\n## Patterns\n\n### 1. Painting tiles at runtime (cell coordinates)\n\n```csharp\nusing UnityEngine;\nusing UnityEngine.Tilemaps;\n\npublic class TilePainter : MonoBehaviour\n{\n    [SerializeField] private Tilemap tilemap;   \u002F\u002F assign the target Tilemap\n    [SerializeField] private TileBase groundTile;\n\n    \u002F\u002F World position -> cell, then place a tile.\n    public void PaintAt(Vector3 worldPos)\n    {\n        Vector3Int cell = tilemap.WorldToCell(worldPos);\n        tilemap.SetTile(cell, groundTile);\n    }\n\n    public bool IsSolid(Vector3 worldPos)\n        => tilemap.GetTile(tilemap.WorldToCell(worldPos)) != null;\n}\n```\n\n### 2. Bulk fill a region (faster than per-cell `SetTile`)\n\n```csharp\n\u002F\u002F SetTilesBlock writes a whole BoundsInt in one call — use it for procedural rooms\u002Ffloors.\npublic void FillFloor(Tilemap map, TileBase tile, int width, int height)\n{\n    var bounds = new BoundsInt(0, 0, 0, width, height, 1);\n    var tiles  = new TileBase[width * height];\n    for (int i = 0; i \u003C tiles.Length; i++) tiles[i] = tile;\n    map.SetTilesBlock(bounds, tiles);\n}\n```\n\n### 3. Clearing and refreshing\n\n```csharp\ntilemap.SetTile(cell, null);   \u002F\u002F null erases the tile at that cell\ntilemap.RefreshTile(cell);     \u002F\u002F re-evaluate just this cell's rule\u002Fanimated neighbors (cheap)\n\u002F\u002F RefreshAllTiles() re-evaluates the ENTIRE map — reserve it for full regenerations, not per-edit.\n```\n\n## Pitfalls\n\n- **`RuleTile` type not found** — it's not built in. Install the **2D Tilemap Extras** package\n  (`com.unity.2d.tilemap.extras`) via Package Manager.\n- **A collider per tile tanks performance \u002F leaves seams** — add a `CompositeCollider2D` with a\n  static `Rigidbody2D` and set Composite Operation to **Merge** to merge the whole layer into\n  one smooth shape.\n- **No \"Used By Composite\" checkbox, or an obsolete warning on `usedByComposite`** — Unity 6\n  replaced it with **Composite Operation** (`Collider2D.compositeOperation`). Old\n  `usedByComposite = true` maps to `CompositeOperation.Merge`; write that instead.\n- **Small gaps remain between merged tiles** — raise the Tilemap Collider 2D's **Extrusion\n  Factor** so neighbouring tile shapes fall within the Composite Collider 2D's Vertex Distance.\n- **Confusing world and cell coordinates** — `SetTile`\u002F`GetTile` take a `Vector3Int` _cell_,\n  not a world position. Always convert with `WorldToCell` \u002F `CellToWorld`.\n- **Tiles render behind\u002Fin front of sprites unexpectedly** — set each `TilemapRenderer`'s\n  Sorting Layer and Order in Layer; multiple tilemaps need explicit ordering.\n- **Rule\u002Fanimated tiles don't update after script edits** — refresh after writes, but prefer\n  the targeted `RefreshTile(cell)` for a few edits; `RefreshAllTiles()` re-evaluates every tile\n  on the map and stalls large levels. Reserve the full refresh for whole-map regenerations.\n- **Painting onto the wrong layer** — the active target Tilemap in the Tile Palette determines\n  where paint lands; check the \"Active Tilemap\" dropdown.\n\n## References\n\n- Primary docs: Unity Manual \"Tilemaps\"\n  (`https:\u002F\u002Fdocs.unity3d.com\u002FManual\u002Ftilemaps\u002Fwork-with-tilemaps\u002Ftilemap-reference.html`),\n  `ScriptReference\u002FTilemaps.Tilemap`, `ScriptReference\u002FCollider2D-compositeOperation`, the\n  Manual \"Tilemap Collider 2D component reference\", and the 2D Tilemap Extras package manual\n  (`https:\u002F\u002Fdocs.unity3d.com\u002FPackages\u002Fcom.unity.2d.tilemap.extras@6.0\u002Fmanual\u002Findex.html`) for\n  Rule Tiles. (`@6.0` is the version that ships with Unity 6.3 LTS; the old `@1.6` docs are\n  for Unity 2021-era projects.)\n\n## Related skills\n\n- `level-design` — engine-agnostic blockout, pacing, and tile layout practice.\n- `procedural-gen` — generating the tile data (noise, RNG, dungeons) you feed to `SetTilesBlock`.\n- `platformer` \u002F `roguelike` — genres that compose this skill with movement and generation.\n",{"name":5,"description":7},"main","5d0a87185c0e172c3901e2a6e5916b6d544b8b94","skills\u002Funity-tilemap-2d","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance","https:\u002F\u002Fgithub.com\u002FJunMystery","AI is the typist, I am the architect. Building efficient, secure, and user-centric products through disciplined AI prompt engineering.","2026-11-13 17:41:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add JunMystery\u002FAgent-Guidance --skill unity-tilemap-2d",{"tool":37,"command":38},"bunx","bunx skills add JunMystery\u002FAgent-Guidance --skill unity-tilemap-2d",{"tool":40,"command":41},"pnpm","pnpm dlx skills add JunMystery\u002FAgent-Guidance --skill unity-tilemap-2d","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Funity-tilemap-2d\u002FSKILL.md",true,[],[46,52,58,64,70,76],{"skillNo":47,"name":48,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":19},"01M79QR1E309VJ6CTQKB32AWWA","zero-trust-architecture-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-architecture-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M79QQV7GHYR02DYGN41S23WN","xss-filter-evasion-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxss-filter-evasion-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79QQNSN7YB8XB61FFSCS3WH","xs-leaks-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxs-leaks-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79QQHZZJKFDY9132G5A65C2","xpath-injection-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxpath-injection-prevention-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79QQB9ZSD3DJG8658EHQXR1","xml-security-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-security-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M79QQ60WKV7PFMXWT9CW8PM6","xml-external-entity-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-external-entity-prevention-cheat-sheet\u002FSKILL.md",[],[]]