| a | Color a |
| b | Color b |
| t | Float for combining a and b |
Интерполирует между цветами a и b на основании t.
t ограничивается между 0 и 1. Когда t равно 0, возвращает a. Когда t равно 1, возвращает b.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public Color lerpedColor = Color.white; void Update() { lerpedColor = Color.Lerp(Color.white, Color.black, Mathf.PingPong(Time.time, 1)); } }
See Also: LerpUnclamped.