Transform.lockRotationZ

Locks rotation on the Z axis

struct Transform
bool lockRotationZ;

Meta