# ArgumentException: TilemapCollider2D: Invalid bounds. The tilemap bounds are empty.

- **ID:** `unity/tilemap-collider-invalid-bounds`
- **Domain:** unity
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

A TilemapCollider2D component is added to a Tilemap that has no tiles placed, causing the collider to compute empty bounds.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Unity 2022.3.5f1 | active | — | — |
| Unity 2023.2.0b2 | active | — | — |

## Workarounds

1. **Add at least one tile to the Tilemap using the Tile Palette or script: `tilemap.SetTile(new Vector3Int(0, 0, 0), yourTile);`.** (95% success)
   ```
   Add at least one tile to the Tilemap using the Tile Palette or script: `tilemap.SetTile(new Vector3Int(0, 0, 0), yourTile);`.
   ```
2. **Remove the TilemapCollider2D component if the tilemap is meant to be empty, or use a CompositeCollider2D with a separate collider setup.** (90% success)
   ```
   Remove the TilemapCollider2D component if the tilemap is meant to be empty, or use a CompositeCollider2D with a separate collider setup.
   ```

## Dead Ends

- **** — Disabling and re-enabling the collider does not fix the empty bounds; the collider still has no tiles to compute from. (80% fail)
- **** — Setting the Tilemap's cell size to zero or negative values may cause other errors but not resolve the empty bounds. (90% fail)
