Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


rigidbody2D

The Rigidbody2D component attached to this GameObject. (Read Only)
Read time 1 minuteLast updated 3 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
Warning
Removed. Property rigidbody2D has been deprecated. Use GetComponent\<Rigidbody2D\>() instead.
public Component rigidbody2D { get; }

Remarks

This property will be null if no Rigidbody2D is attached.
Additional Resources: GameObject.rigidbody.