Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Evaluate

Manually query the gradient to calculate colors based on what mode it is in.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.ParticleSystemModule

Evaluate(float)

Manually query the gradient to calculate colors based on what mode it is in.
public Color Evaluate(float time)

Parameters

time

Normalized time (in the range 0 - 1, where 1 represents 100%) at which to evaluate the gradient. This is valid when ParticleSystem.MinMaxGradient.mode is set to ParticleSystemGradientMode.Gradient or ParticleSystemGradientMode.TwoGradients.

Returns

Type

Description

ColorCalculated gradient/color value.

Remarks

This automatically clamps the time and lerpFactor properties between 0 and 1.

Evaluate(float, float)

Manually query the gradient to calculate colors based on what mode it is in.
public Color Evaluate(float time, float lerpFactor)

Parameters

time

Normalized time (in the range 0 - 1, where 1 represents 100%) at which to evaluate the gradient. This is valid when ParticleSystem.MinMaxGradient.mode is set to ParticleSystemGradientMode.Gradient or ParticleSystemGradientMode.TwoGradients.

lerpFactor

Returns

Type

Description

ColorCalculated gradient/color value.

Remarks

This automatically clamps the time and lerpFactor properties between 0 and 1.