Explore the properties you can use to generate collisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
See in Glossary shapes for the tiles on a tilemapA GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
See in Glossary. For more information, refer to Enable collision detection for tiles.
| Property | Description |
|---|---|
| Max Tile Change Count | Sets the maximum number of changes you can make in a tilemap before Unity regenerates all the collision shapes. The default value is 1000. Decrease this value to regenerate all the collision shapes more often, which can improve performance if you change lots of tiles frequently. |
| Extrusion Factor | Sets how far to extend the collision shape of each tile, in units. This property is available only if you attach a Composite ColliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info See in Glossary 2D component to the same GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info See in Glossary, and set Composite Operation to an option other than None. Use this property to bring collision shapes to within the Vertex Distance property of the Composite Collider 2D component, so the component combines the shapes. |
| Use Delaunay MeshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info See in Glossary |
Enables Unity using a Delaunay triangulation algorithm to generate the collision shapes. Enabling this property can improve collision shapes for tiles with complex shapes, but can reduce performance. |
| Material | Sets the 2D physics material that determines the behavior of collisions, such as friction and bounce. |
| Is Trigger | Enables the shape going through other shapes without generating a collision response. Instead, the shape generates a trigger event when another shape overlaps. |
| Used by Effector | Allows an Effector 2D component attached to the same GameObject to affect collisions. |
| Composite Operation | If a Composite Collider 2D component is attached to the same GameObject, sets how the component combines the collision shapes of the tiles. The options are:
|
| Composite Order | Sets when Unity calculates the combined collision shapes, relative to other Composite Collider 2D components. Unity calculates in numerical order, so it calculates colliders with lower values first. This property is available only if you set Composite Operation to a value other than None. |
| Offset | Offsets the position of the collision shapes from the tile positions, in units. |
| Property | Description |
|---|---|
| Layer Override Priority | Sets the decision priority when this collision shape collides with another collision shape. Refer to Collider2D-layerOverridePriority. |
| Include Layers | Sets the layers this collision shape collides with. Refer to Collider2D-includeLayers. |
| Exclude Layers | Sets the layers this collision shape doesn’t collide with. Refer to Collider2D-excludeLayers. |
| Force Send Layers | Sets the layers this collision shape sends forces to during collisions. Refer to Collider2D-forceSendLayers. |
| Force Receive Layers | Sets the layers this collision shape can receive forces from during collisions. Refer to Collider2D-forceReceiveLayers. |
| Contract Capture Layers | Sets the layers of other Collider 2D components to capture during collisions. Refer to Collider2D-contactCaptureLayers. |
| Callback Layers | Sets the layers to report collisions or triggers with. Refer to Collider2D-callbackLayers. |
| Property | Sub-property | Description |
|---|---|---|
| Attached Body | N/A | The RigidbodyA component that allows a GameObject to be affected by simulated gravity and other forces. More info See in Glossary 2D component attached to the same GameObject as this component. |
| Shape Count | N/A | The number of individual shapes in the collider. |
| Material | N/A | The properties of the 2D physics materialA physics asset for adjusting the friction and bouncing effects of colliding objects. More info See in Glossary set in Material. |
| N/A | Friction | The friction value of the 2D physics material. |
| N/A | Bounciness | The bounciness value of the 2D physics material. |
| N/A | Friction Combine | The friction combine setting of the 2D physics material. |
| N/A | Bounciness Combine | The bounce combine setting of the 2D physics material. |
| Bounds | N/A | The boundary of the collider. |
| N/A | Center | The center of the collider in world space. |
| N/A | Extents | The size of the collider in world space. |
For more information about the properties of a 2D physics material, refer to Physics Material 2D reference.