Unity 2D: lock axis

Is there a way to lock the object in the x-axis in Unity 4.3 2D?
I have a 2D sprite with a rigidbody2D attached to it.

You can constrain which axis it can’t move in, in the rigid body.

I know this is an old question, but Google didn’t reveal the right answer anywhere.

For RigidBody2D you can constrain in one axis by attaching a SliderJoint2D