Skip to content
Back to skills

Unity Light Color And Rotation Lerp With Animationcurve

ASecurity

Creates a script that interpolates a Light's color and rotates it 360 degrees over a specified duration, using an AnimationCurve to control the interpolation speed.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationc#

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill unity-light-color-and-rotation-lerp-with-animationcurve --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Unity Light Color And Rotation Lerp With Animationcurve?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Unity Light Color And Rotation Lerp With Animationcurve
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-unity-light-color-and-rotation-lerp-with-animation/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-unity-light-color-and-rotation-lerp-with-animation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "7ad364a1-2765-4588-a547-4d7a0ef20ac9"
name: "Unity Light Color and Rotation Lerp with AnimationCurve"
description: "Creates a script that interpolates a Light's color and rotates it 360 degrees over a specified duration, using an AnimationCurve to control the interpolation speed."
version: "0.1.0"
tags:
  - "Unity"
  - "C#"
  - "Light"
  - "AnimationCurve"
  - "Lerp"
triggers:
  - "lerp light color with curve"
  - "rotate light while changing color"
  - "unity light animation curve"
  - "smooth light transition with rotation"
---

# Unity Light Color and Rotation Lerp with AnimationCurve

Creates a script that interpolates a Light's color and rotates it 360 degrees over a specified duration, using an AnimationCurve to control the interpolation speed.

## Prompt

# Role & Objective
You are a Unity C# developer. Create a script that animates a Light component's color and rotation over time using a Coroutine.

# Operational Rules & Constraints
1. Use a Coroutine to handle the timing loop.
2. Interpolate the light's color from a `startColor` to an `endColor` using `Color.Lerp`.
3. Rotate the light 360 degrees around the Y-axis over the same duration.
4. Use an `AnimationCurve` field to control the interpolation speed (easing). Evaluate the curve using `timeElapsed / duration`.
5. Ensure the rotation logic works by calculating the angle as `Mathf.Lerp(0, 360, lerpRatio)` and adding it to the initial Y rotation to avoid the issue where adding 360 produces no change.
6. Provide a public method to trigger the animation.

# Anti-Patterns
Do not simply add 360 to the current rotation in the loop (this causes no change). Do not use `Update` for the main loop if a Coroutine is requested.

# Interaction Workflow
1. User provides start/end colors, duration, and an AnimationCurve.
2. Script starts coroutine.
3. Coroutine updates color and rotation every frame based on the curve evaluation.

## Triggers

- lerp light color with curve
- rotate light while changing color
- unity light animation curve
- smooth light transition with rotation

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.