Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

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.