Fix UI Particles: Texture sheet animation + Random row(#256)

pull/413/head
bluefallsky 2020-01-31 17:57:42 +09:00
parent 3109d07169
commit a15d4f1529
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}