disable rigidbody code example
Example 1: how to turn on and off a rigid body
rigidbody.detectionCollisions = false;
Example 2: unity rigidbody2d disable
//you can't :(
//you can delete it with
Destroy(RigidBody2D);
rigidbody.detectionCollisions = false;
//you can't :(
//you can delete it with
Destroy(RigidBody2D);