here are the commands i use:
GetComponent ().constraints = RigidbodyConstraints2D.FreezeRotation;
GetComponent ().constraints = RigidbodyConstraints2D.FreezepositionX;
It only gives me the choise to freeze position x and y or the rotation only or alla of them at the same time.
I just only want to have the position.y unchecked which i can do it manually in the inspector but not in the script.
Any ideas???