API update guarded with #if directive
parent
42c2a5dace
commit
78c2d42a9a
|
@ -193,7 +193,11 @@ namespace UnityEngine.UI.Extensions
|
||||||
Vector4 particleUV = _uv;
|
Vector4 particleUV = _uv;
|
||||||
if (_textureSheetAnimation.enabled)
|
if (_textureSheetAnimation.enabled)
|
||||||
{
|
{
|
||||||
|
#if UNITY_5_5_OR_NEWER
|
||||||
float frameProgress = 1 - (particle.remainingLifetime / particle.startLifetime);
|
float frameProgress = 1 - (particle.remainingLifetime / particle.startLifetime);
|
||||||
|
#else
|
||||||
|
float frameProgress = 1 - (particle.lifetime / particle.startLifetime);
|
||||||
|
#endif
|
||||||
// float frameProgress = textureSheetAnimation.frameOverTime.curveMin.Evaluate(1 - (particle.lifetime / particle.startLifetime)); // TODO - once Unity allows MinMaxCurve reading
|
// float frameProgress = textureSheetAnimation.frameOverTime.curveMin.Evaluate(1 - (particle.lifetime / particle.startLifetime)); // TODO - once Unity allows MinMaxCurve reading
|
||||||
frameProgress = Mathf.Repeat(frameProgress * _textureSheetAnimation.cycleCount, 1);
|
frameProgress = Mathf.Repeat(frameProgress * _textureSheetAnimation.cycleCount, 1);
|
||||||
int frame = 0;
|
int frame = 0;
|
||||||
|
|
Loading…
Reference in New Issue