Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

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

Removed in version 5.0.1p4
Property rigidbody2D has been deprecated. Use GetComponent<Rigidbody2D>() instead. (UnityUpgradable)

GameObject.rigidbody2D

Switch to Manual
public var rigidbody2D: Component;

Description

The Rigidbody2D component attached to this GameObject. (Read Only)

This property will be null if no Rigidbody2D is attached.

See Also: rigidbody.