How to rotate an object to an angle, and repeat for ever.

I am a newbie here,have no idea about this,just had try transform.rotate.

How can I implement this?

Thanks.

Not sure what you mean by "repeat forever? since once you have arrived at a particular rotation angle unless you then set it back to the original rotation how does it keep repeating?

Anyways the Script reference has lots of code examples as does this site if you search.

http://unity3d.com/support/documentation/ScriptReference/Quaternion.LookRotation.html

and

http://unity3d.com/support/documentation/ScriptReference/Transform-rotation.html be sure to look at all the related Functions.

and

http://answers.unity3d.com/questions/5980/lock-rotation-of-object

If what you want is just to rotate and object around it's own axis and keep doing this at all times, this link should answer your question:

http://unity3d.com/support/documentation/ScriptReference/Transform.Rotate.html

But I am not sure if that is actually what you are looking for?