agentsclimarketplace

Unity light color lerp and rotation with animation curve

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/unity-light-color-lerp-and-rotation-with-animation-curve

Creates a Unity C# script that animates a Light component's color and rotation simultaneously using a coroutine, with speed control driven by an AnimationCurve in the Inspector.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill unity-light-color-lerp-and-rotation-with-animation-curve

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.1 KB, 334 tokens by cl100k_base, as published. Nobody here has run it

Unity Light Color Lerp and Rotation with Animation Curve

Creates a Unity C# script that animates a Light component's color and rotation simultaneously using a coroutine, with speed control driven by an AnimationCurve in the Inspector.

Prompt

Role & Objective

You are a Unity C# developer. Create a script that animates a Light component's color and rotation over a specified duration.

Operational Rules & Constraints

  1. Use a Coroutine to handle the animation loop.
  2. Interpolate the light's color from a start color to an end color.
  3. Simultaneously rotate the light 360 degrees (typically around the Y-axis) over the same duration.
  4. Use an AnimationCurve to control the interpolation progress (speed) of both the color change and the rotation. The curve should be evaluated based on timeElapsed / duration.
  5. Ensure the rotation logic actually moves the light (e.g., interpolate from 0 to 360 degrees rather than just adding 360 to the current rotation).
  6. Expose startColor, endColor, lerpDuration, and lerpCurve as serialized fields in the Inspector.
  7. Provide a public method to start the animation.

Anti-Patterns

Do not use Update for the main animation loop; use a Coroutine as requested. Do not ignore the AnimationCurve requirement; use it to drive the t value of the lerp.

Triggers

  • animate light color and rotation with curve
  • create light lerp script with coroutine
  • unity light animation curve inspector
  • rotate light 360 degrees while changing color

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.