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.

GameObject.rigidbody2D

var rigidbody2D: Rigidbody2D;
Rigidbody2D rigidbody2D;
rigidbody2D as Rigidbody2D

Description

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

This property will be null if no Rigidbody2D is attached.

See Also: rigidbody.