No, you posted your original code in your first post
Your subsequent posts would seem to indicate that the code’s been changed since then. If not, perhaps you could clarify that (just so we know what we should be looking at).
I’m not sure how Unity handles Euler angles internally off the top of my head (it might say in the docs somewhere). I assume it behaves sensibly as far as the ranges of the angles are concerned when an individual angle is modified, but without checking I can’t say that for sure.
However, you shouldn’t need to use Euler angles at all for this. Instead, you can just write (untested):
var rotateSpeed = 20;
function Update()
{
transform.Rotate(Vector3.up * rotateSpeed * Time.deltaTime);
}
As the docs say about eulerAngles: “Only use this variable to read and set the angles to absolute values. Don’t increment them, as it will fail when the angle exceeds 360 degrees. Use Transform.Rotate instead.” Also: “Do not set one of the eulerAngles axis separately (eg. eulerAngles.x = 10; ) since this will lead to drift and undesired rotations. When setting them to a new value set them all at once as shown above.”