Colliders¶
The Collider tab turns a tilemap's tiles into physics colliders, 2D or 3D, and lets you edit tile collider shapes directly in the Scene view.
Concept¶
Which tiles collide, and with what shape, is set per tile in the tileset: none, the full cell, or a polygon. Tile Properties covers that. The tilemap reads those shapes and builds colliders from them, one set per chunk, merging neighbouring tiles into larger outlines instead of one collider per tile.
The colliders are components on the hidden chunk GameObjects. They are rebuilt whenever you paint, so you never add or edit them by hand. To see them in the Hierarchy, turn on Show Tile Chunks in the Map tab.
How to use it¶
- Select the tilemap and open the
Collidertab. - Under
Collider Type:pick2Dor3D. A new tilemap starts atNone. - For 2D, choose the
Collider 2D Type. - Make sure the tiles that should be solid have a collider in the tileset.
The collider outlines are drawn in the Scene view in green while the tilemap is selected.

Reference¶
| Field | What it does |
|---|---|
Collider Type: |
None, 2D or 3D. |
Collider Generation Method |
How tile shapes are merged. Default or Clipper. Tooltip: Default: is faster, but less precise with PolygonCollider2D. In general, use Clipper only if Default is not working for PolygonCollider2D. |
Collider Depth |
3D only. How deep the collider walls are along the tilemap's Z axis, centered on the tilemap's plane. |
Physic Material |
3D only. The physics material given to every MeshCollider. |
Collider 2D Type |
2D only. EdgeCollider2D or PolygonCollider2D. See below. |
Show Collider Normals |
2D only. Draws a short line on each collider segment showing which way it faces. |
Physic Material 2D |
2D only. The physics material given to every 2D collider. |
Is Trigger |
Makes every collider a trigger. |
Collider Display Mode |
When the outlines are drawn in the Scene view: Selected (the tilemap is selected), ParentSelected (the tilemap or any of its parents is selected) or Always. The grid from the Map tab follows this setting too. |
Collider 2D Optimization Disabled |
Only shown for PolygonCollider2D. Gives each tile its own path instead of merging neighbours. |
Update Collider Mesh |
Rebuilds the colliders. |
Collider Color |
Under Global Parameters:. The color of the outlines, for every tilemap, saved on your machine. |
Changing any field in this tab rebuilds the colliders straight away. Update Collider Mesh is for when you changed tile collider shapes in the tileset and want to see the result without painting.
What each type builds¶
2D with EdgeCollider2D. Each chunk gets one EdgeCollider2D per outline. Edges shared by two solid tiles are removed, including across chunk borders, so a floor of tiles becomes one line along its top and sides.
2D with PolygonCollider2D. Each chunk gets one PolygonCollider2D holding every outline as a path. The shapes have an inside, so a point within a wall counts as inside the collider. Across a chunk border the two sides are treated as separate shapes, so you will see an outline along the border.
3D. Each chunk gets one MeshCollider. Its mesh is a strip of walls standing on the tile outlines, Collider Depth deep. With Is Trigger on, Unity requires a convex mesh collider, so each chunk's trigger becomes one convex hull around all of its shapes. That is rarely what you want.
Warnings in the tab¶
With Is Trigger on:
Activating IsTrigger could generate wrong collider lines if not used properly. Use Show Tilechunks in Map section to display the real collider lines.
With PolygonCollider2D:
Using Polygon colliders could generate wrong collider lines if not used properly. Use Show Tilechunks in Map section to display the real collider lines. If performance is not a problem, disable the Collider 2D optimizations to avoid this issue.
The checkbox that follows the second warning is Collider 2D Optimization Disabled. Turn it on if the merged polygon outlines come out wrong. It costs more physics shapes, one per solid tile.
Edge or polygon for a platformer¶
Start with EdgeCollider2D. Within a chunk it builds one continuous line along each run of floor or wall, so a character sliding along a row of tiles does not snag on the joins between individual tiles.
Its weakness is that an edge has no inside. A body that ends up inside a wall, from a fast fall or a spawn point placed in the ground, is not pushed out, and queries such as Physics2D.OverlapPoint inside a wall find nothing. Keep movement speeds sane or use continuous collision detection on fast bodies.
Switch to PolygonCollider2D when you need solid areas: overlap checks, triggers that detect being inside a region, or physics bodies that must be pushed out of walls. Watch the chunk borders, since the outlines split there.
Either way, the joins between tiles inside a chunk never catch a character. Measured with a body driven along a floor of 240 tiles, a box and a capsule crossed every tile at 3 to 14 units a second without slowing down or lifting, where Unity's TilemapCollider2D without a composite stopped a box dead within 55 tiles.
The one place a joint remains is the border between two chunks, every 60 cells, where one chunk's outline ends and the next one's starts. A capsule, not a box, can lift off it at some speeds: for one physics step on a flat floor, and for up to a few steps where a slope crosses the border. A grounded check in your controller may read false for that step. If that matters for your game, merge the chunks with a Composite Collider 2D, below. The Pixel Platform sample shows both: its character counts the moments it loses the ground, and C switches between the two setups. See Sample Scenes.
Merging chunks with a Composite Collider 2D¶
Unity's Composite Collider 2D can merge the colliders of every chunk into one outline, which removes the joints at chunk borders as well. In the same measurement a capsule never left the ground anywhere, flat or sloped.
- Set
Collider 2D TypetoPolygon Collider 2D. Unity does not merge edge colliders. - On the tilemap's GameObject,
Add Component>Composite Collider 2D. Unity adds aRigidbody 2Dwith it. - Set that
Rigidbody 2D'sBody TypetoStatic, or the level falls when you press Play.
The tilemap marks its chunk colliders for the composite by itself, now and on every rebuild. The Collider tab shows a warning with a fix button for each of these: a Rigidbody 2D that is not Static, Collider 2D Type still set to Edge Collider 2D, and chunk colliders built before the composite was added.
Put the composite on a parent instead, such as the TilemapGroup, with the static Rigidbody 2D next to it, and it merges every tilemap under it into the same outline.
Set Is Trigger and the physics material on the Composite Collider 2D. The chunk colliders' own settings no longer count once they are merged.
What it costs¶
Without a composite, painting a tile rebuilds the colliders of that chunk only, so the cost stays the same however big the map is. A composite regenerates the outline of the whole map on every change. Measured by painting one tile on a level of hills and platforms, median of nine edits:
| Map | No composite | Generation Type Synchronous |
Generation Type Manual |
|---|---|---|---|
| 128 by 128 | 1.1 ms | 2.3 ms | 1.7 ms |
| 256 by 256 | 0.5 ms | 4.3 ms | 2.4 ms |
| 512 by 512 | 0.7 ms | 15.0 ms | 7.9 ms |
Set the composite's Generation Type to Manual. The tilemap then regenerates it once at the end of each rebuild, instead of once for every chunk that changed.
For a level you build in the editor and do not change in play, the cost only shows while you paint. For a big map that changes during play, a destructible or generated one, it is paid on every edit, and at 512 by 512 that is half a frame at 60 frames a second. Leave the composite out there.
Collisions covers how chunk colliders reach your scripts and how to find the tile you hit.
Editing tile colliders in the Scene view¶
While the Collider tab is open, hovering over a tile in the Scene view shows that tile's collider shape with numbered vertices, and a help box in the lower left of the Scene view lists the controls:
| Action | How |
|---|---|
| Turn the tile's collider on or off | Hold Alt and click the dot in the middle of the tile. |
| Move a vertex | Drag it. Vertices snap to the pixels of the tile. |
| Add a vertex | Hold Shift and click on the outline. |
| Remove a vertex | Hold Ctrl and click it. A shape keeps at least two vertices. |
| Select the tile in the palette | Right click it. |

Warning
These edits change the tile in the tileset, not the cell. Every cell showing that tile, in every tilemap that uses the tileset, gets the new shape.
On macOS the keys are Option and Command. Editing a full tile collider turns it into a polygon, and a polygon dragged back to the four corners becomes a full collider again.
Brushes drawn from subtiles¶
Some brushes assemble a cell from four quarters of different tiles: a Carpet brush does it for single cells and lines one tile wide, and an A2X2 brush does it for every cell. Such a cell collides with the shape its quarters draw, since each quarter takes the matching quarter of its own tile's collider. That holds for every generation method and collider type. Before version 1.7.8 the cell used the collider of the single tile stored in it, so a corner drawn round could still collide as a square.