Component.collider2D
var collider2D: Collider2D;
Collider2D collider2D;
collider2D as Collider2D
Description

The Collider2D component attached to the object.

This returns null if no Collider2D is attached.

See Also: Collider2D class.