rotation x, y, z unity code example
Example 1: get objects z rotation in degrees unity
gameObject.transform.rotation.eulerAngles.z
Example 2: transform.rotation.x unity
transform.eulerAngles = new Vector3( xRotation, transform.eulerAngles.y, transform.eulerAngles.z );