Unity Script Reference:
RigidbodyConstraints.FreezeAll
Description

Freeze rotation and motion along all axes.