Merged in bluefallsky/unity-ui-extensions (pull request #65)
Fix UI Particles: Texture sheet animation + Random row(#256)pull/413/head
commit
c1336f4a1d
|
@ -227,7 +227,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
frame %= textureSheetAnimationFrames;
|
frame %= textureSheetAnimationFrames;
|
||||||
|
|
||||||
particleUV.x = (frame % textureSheetAnimation.numTilesX) * textureSheetAnimationFrameSize.x;
|
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.z = particleUV.x + textureSheetAnimationFrameSize.x;
|
||||||
particleUV.w = particleUV.y + textureSheetAnimationFrameSize.y;
|
particleUV.w = particleUV.y + textureSheetAnimationFrameSize.y;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue