unity convert to rotation 0 to 1 code example Example: get objects z rotation in degrees unity gameObject.transform.rotation.eulerAngles.z