unity turn on off contraints code example
Example: rigidbody2d unfreeze position
public Rigidbody2D rb;
void Start()
{
rb.constraints = RigidbodyConstraints2D.None;
}
public Rigidbody2D rb;
void Start()
{
rb.constraints = RigidbodyConstraints2D.None;
}