unity unfreeze position code example
Example 1: rigidbody2d unfreeze position
public Rigidbody2D rb;
void Start()
{
rb.constraints = RigidbodyConstraints2D.None;
}
Example 2: unity unfreeze position in script
using UnityEngine;
public class FreezePosition : MonoBehaviour
{
public GameObject TheThingToFreeze;
public void Start()
{
TheThingToFreeze.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.None;
}
}