From 42c2a5dacef8cba69e21bb2eea5931605da477fb Mon Sep 17 00:00:00 2001 From: Mauro Ronchi Date: Thu, 29 Jun 2017 15:00:19 +0200 Subject: [PATCH] Unity API Update 5.6.2 --- Scripts/Effects/UIParticleSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Effects/UIParticleSystem.cs b/Scripts/Effects/UIParticleSystem.cs index 081f339..7eafad2 100644 --- a/Scripts/Effects/UIParticleSystem.cs +++ b/Scripts/Effects/UIParticleSystem.cs @@ -193,7 +193,7 @@ namespace UnityEngine.UI.Extensions Vector4 particleUV = _uv; if (_textureSheetAnimation.enabled) { - float frameProgress = 1 - (particle.lifetime / particle.startLifetime); + float frameProgress = 1 - (particle.remainingLifetime / particle.startLifetime); // float frameProgress = textureSheetAnimation.frameOverTime.curveMin.Evaluate(1 - (particle.lifetime / particle.startLifetime)); // TODO - once Unity allows MinMaxCurve reading frameProgress = Mathf.Repeat(frameProgress * _textureSheetAnimation.cycleCount, 1); int frame = 0;