Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

Collider2D.attachedRigidbody

Switch to Manual
public var attachedRigidbody: Rigidbody2D;

Description

The Rigidbody2D attached to the Collider2D's GameObject.

This property will be null if no Rigidbody2D is attached.

See Also: Rigidbody2D::ref::