Set Rotation Angle

I know this will sound very simple, but how do you set the angle of an object instead of a continuous rotation like Rotate(). I want to figure out the angle the mouse is from the center of the screen and set the y angle of an object to that mouse's angle.

To set an object's rotation 'from scratch', you can make an assignment to the Transform 'rotation', 'localRotation', 'eulerAngles', or 'localEulerAngles' field, whichever is appropriate.

Unless the object is a child object of another object, you'll probably want to use 'rotation' or 'eulerAngles'. Of these, 'eulerAngles' is probably closest to what you want, as it allows you to specify the angles of rotation directly without any intermediate steps.