agentsclimarketplace

Unity light color and rotation lerp with animationcurve

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/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.From its SKILL.md

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

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.0 KB, 335 tokens by cl100k_base, as published. Nobody here has run it

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

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.