unity deactivate rigidbody2d code example
Example 1: rigidbody2d freeze position
public Rigidbody2D rb;
void Start()
{
rb.constraints = RigidbodyConstraints2D.FreezeAll;
}
Example 2: how to add reference to rigidbody 2d
public Rigidbody2D rb;
Example 3: unity rigidbody2d disable
//you can't :(
//you can delete it with
Destroy(RigidBody2D);