Unity C# Smooth Object Rotation Script

Job ID: 40058702

Budget: $10 – $30 USD

I need a lightweight C# component for Unity that I can drop onto a specific GameObject and have it rotate smoothly every frame. The script must expose public fields so I can tweak the rotation axis and speed from the Inspector at runtime.

Key points you should cover:
• Rotation, not movement or toggling.
• Public variables for direction (Vector3) and speed (float) so I can dial in values without opening the code.
• Clean, self-explanatory comments that make the logic easy to follow.

Attach-ready: I’ll be adding this directly to the target GameObject, so no additional setup or UI hooks are necessary.

I’m on a tight same-day turnaround, so please send back a single .cs file that compiles without warnings in the latest LTS version of Unity, along with a quick note confirming any Inspector options you exposed.
Unity version: 2021 LTS or newer.
Related categories: C# Programming Game Development Unity