From a15d4f15296f550dd6cb127e797ced986cc0e8e3 Mon Sep 17 00:00:00 2001 From: bluefallsky Date: Fri, 31 Jan 2020 17:57:42 +0900 Subject: [PATCH] Fix UI Particles: Texture sheet animation + Random row(#256) --- 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 beaaf4d..abf0fa5 100644 --- a/Scripts/Effects/UIParticleSystem.cs +++ b/Scripts/Effects/UIParticleSystem.cs @@ -227,7 +227,7 @@ namespace UnityEngine.UI.Extensions frame %= textureSheetAnimationFrames; particleUV.x = (frame % textureSheetAnimation.numTilesX) * textureSheetAnimationFrameSize.x; - particleUV.y = Mathf.FloorToInt(frame / textureSheetAnimation.numTilesX) * textureSheetAnimationFrameSize.y; + particleUV.y = 1.0f - Mathf.FloorToInt(frame / textureSheetAnimation.numTilesX) * textureSheetAnimationFrameSize.y; particleUV.z = particleUV.x + textureSheetAnimationFrameSize.x; particleUV.w = particleUV.y + textureSheetAnimationFrameSize.y; }