unity freeze 2d position on script code example
Example: rigidbody2d freeze position
public Rigidbody2D rb;
void Start()
{
rb.constraints = RigidbodyConstraints2D.FreezeAll;
}
public Rigidbody2D rb;
void Start()
{
rb.constraints = RigidbodyConstraints2D.FreezeAll;
}