BoxCollider2D
Collider for 2D physics representing an axis-aligned rectangle.
Read time 9 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: Collider2D
public sealed class BoxCollider2D : Collider2D
Remarks
Properties
Property | Description |
|---|---|
| autoTiling | Determines whether the BoxCollider2D's shape is automatically updated based on a SpriteRenderer's tiling properties. |
| edgeRadius | Controls the radius of all edges created by the collider. |
| size | The width and height of the rectangle. |
Inheritance
Inherited Members
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. |