Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BoxCollider2D

Collider for 2D physics representing an axis-aligned rectangle.
Read time 9 minutesLast updated 2 days ago

Definition

public sealed class BoxCollider2D : Collider2D

Remarks

Properties

Property

Description

autoTilingDetermines whether the BoxCollider2D's shape is automatically updated based on a SpriteRenderer's tiling properties.
edgeRadiusControls the radius of all edges created by the collider.
sizeThe 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.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.