TilemapCollider2D
Collider for 2D physics representing shapes defined by the corresponding Tilemap.
Read time 10 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine.Tilemaps
- Assembly: UnityEngine.TilemapModule
- Inherits from: Collider2D
[RequireComponent(typeof(Tilemap))]public sealed class TilemapCollider2D : Collider2D
Remarks
Properties
Property | Description |
|---|---|
| extrusionFactor | The amount of Collider shapes each Tile extrudes to facilitate compositing with neighboring Tiles. This eliminates fine gaps between Tiles when using a CompositeCollider2D. This is calculated in Unity units within world space. |
| hasTilemapChanges | Returns true if there are Tilemap changes that require processing for Collider updates. Returns false otherwise. |
| maximumTileChangeCount | Maximum number of Tile Changes accumulated before doing a full collider rebuild instead of an incremental rebuild. |
| useDelaunayMesh | When the value is true, the Collider uses an additional Delaunay triangulation step to produce the Collider mesh. When the value is false, this additional step does not occur. |
Methods
Method | Description |
|---|---|
| ProcessTilemapChanges | Processes Tilemap changes for Collider updates immediately, if there are any. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |