Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

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

Collider2D.attachedRigidbody

Switch to Manual
public Rigidbody2D attachedRigidbody;

Description

The Rigidbody2D attached to the Collider2D's GameObject.

This property will be null if no Rigidbody2D is attached.

See Also: Rigidbody2D::ref::