toggle script on button press?

Hello fellow game devs! :)

I am developing a showroom, i wrote a working script to rotate a game object.

BUT! There is one question i just can't find an answer to :/

i want to toggle the rotation ON/OFF by pressing "R" on the keyboard.

how is this possible?

thanks in advance

h4wkeye

1 Answer

1

http://answers.unity3d.com/questions/2237/easy-question-how-to-disable-script-object

http://unity3d.com/support/documentation/ScriptReference/Input.html

Have fun buddy =).