Cómo agregar referencia a Rigidbody 2D
public Rigidbody2D rb;
Azad Kshitij
public Rigidbody2D rb;
public Rigidbody rigidbody;
Rigidbody2D rb;
// Can use Awake
void Start()
{
// Ataches the rigedbody that is on the gameObject to rb
rb = GetComponent<Rigidbody2D>();
}