How to reset rotation

I am trying to reset the rotation of my object(directional light) to 0 after it passes 360 degrees. i’ve tried
if (Input.GetAxisRaw(“x”) > 360)
transform.rotation = Quaternion.identity;
but it does not work

I played around with it for a bit and got it working, thank you for trying to help though (:

Input.GetAxisRaw is for getting user input. For example it returns -1 when user is holding the “S” key and returns 1 when user is holding the “W” key.

What you’re trying to do is probably get the objects rotation in euler angles
transform.rotation.eulerAngles.x > 360

if (Input.GetAxisRaw(“x”) > 360) this line is not correct.

Input.GetAxisRaw return value from -1 to 1 depends of direction.

Tell me what excatly you want to do and I will try to do this.