The TilemapCollider component automatically generates collision shapes for tilemap edges.
When composite is FALSE, it creates individual rectangle colliders for each edge tile.
When composite is TRUE, it optimizes by generating connected line segments that follow the tilemap's outer edges.
This is useful for efficiently handling collision detection with tilemap boundaries. Limitations: The collider shapes are generated once and cannot be modified after creation.
To update the collision shapes, you must create a new TilemapCollider instance.
The TilemapCollider component automatically generates collision shapes for tilemap edges.
When composite is FALSE, it creates individual rectangle colliders for each edge tile.
When composite is TRUE, it optimizes by generating connected line segments that follow the tilemap's outer edges.
This is useful for efficiently handling collision detection with tilemap boundaries.
Limitations: The collider shapes are generated once and cannot be modified after creation. To update the collision shapes, you must create a new TilemapCollider instance.
Example