Version: 5.4 beta (switch to 5.3)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ParticleSystem.MinMaxCurve.Evaluate

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public function Evaluate(time: float): float;
public float Evaluate(float time);
public function Evaluate(time: float, lerpFactor: float): float;
public float Evaluate(float time, float lerpFactor);

Parameters

time Percentage along the curve (Valid when ParticleSystem.MinMaxCurve.mode is set to ParticleSystemCurveMode.Curve or ParticleSystemCurveMode.TwoCurves).
lerpFactor Blend between the 2 curves/constants (Valid when ParticleSystem.MinMaxCurve.mode is set to ParticleSystemCurveMode.TwoConstants or ParticleSystemCurveMode.TwoCurves).

Returns

float Calculated curve/constant value.

Description

Manually query the curve to calculate values based on what mode it is in.

The time and lerpFactor parameters will be automatically clamped into the 0-1 range.