Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Evaluate(float)

Calculate color at a given time.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public Color Evaluate(float time)

Parameters

time

Time of the evaluation (0 - 1).

Returns

Type

Description

Color

Remarks

Gradient color and alpha keys are blended and interpolated depending on the gradient Gradient.mode.
Unity clamps the colors and alpha if you use a value for
time
that's smaller than
0
or larger than
1
.