Accessing the z axis of Rotation in Debug

I am trying to access the z-axis of the transform Rotation component so I can see the information on the console.`#pragma strict

var global = RobotMove.RotateSpeed;

var data: float = 0;

function Update () {

transform.Rotate (Vector3( 0, 0, Input.GetAxis("Mouse Y") * global * Time.deltaTime));



You want:


Note that the value output may not be the one you expect. There are multiple euler angles for any given physical rotation, and Unity sometimes changes to a different representation from the one set.