This version of Unity is unsupported.

RaycastHit2D.rigidbody

public Rigidbody2D rigidbody;

Description

The Rigidbody2D attached to the object that was hit.

See Also: Rigidbody2D class.