
You enable a Composite Collider on your Tilemap or 2D object, expecting a clean, merged collision shape. Instead, you notice gaps in the collider. Characters fall through certain spots. Small holes appear where solid tiles should be.
This is often described as a “Composite Collider bug.” In most cases, Unity is working correctly. The issue usually comes from collider configuration, geometry type settings, or tile alignment problems.
Here is how to diagnose and fix it step by step.
The Composite Collider 2D merges multiple Collider 2D shapes into one optimized outline.
It requires:
If any of these are misconfigured, geometry may not combine properly.
The Composite Collider requires a Rigidbody2D on the same GameObject.
Without it, the collider may not generate correctly.
Best practice:
Select your TilemapCollider2D or other Collider2D components and verify:
If this option is disabled, the Composite Collider will ignore those shapes.
Composite Collider has two geometry types:
If you see unexpected holes, switch between them and test.
Outlines generate edge-based shapes. Polygons generate filled shapes. For solid terrain, Polygons is often more reliable.
If using TilemapCollider2D, verify:
If a tile has no collider defined in the Sprite Editor, the Composite Collider cannot include it.
If tile positions are slightly misaligned, small gaps can appear in the generated collider.
Check:
Tilemaps should usually remain at scale (1,1,1).
The Composite Collider has a setting called:
If this value is too high, Unity may simplify shapes too aggressively and remove small sections.
Try lowering Vertex Distance (for example, from 0.1 to 0.01) and regenerate.
If using Platform Effector 2D or one-way colliders, parts of the composite may intentionally not behave as solid.
Make sure effectors are configured correctly and not interfering with expected collision behavior.
Sometimes the collider does not refresh immediately.
Try:
This forces Unity to rebuild the geometry.
This usually happens because:
Open the Sprite Editor and inspect the custom physics shape for each tile.
For grid-based games, use simple box shapes instead of detailed outlines.
True engine bugs in Composite Collider are rare in current Unity versions. Most holes in generated geometry come from misconfiguration or overly simplified shapes.
Composite Collider works best with clean, grid-aligned, consistent tiles.
If you see holes in your Composite Collider geometry, focus on configuration before assuming an engine issue.
Proper Rigidbody setup, correct geometry type, and clean tile collider shapes solve almost all cases.
Once configured correctly, Composite Collider creates efficient and reliable 2D collision surfaces.